<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Udvikleren.dk - Seneste [int] forum tråde</title>
    <description>De seneste forum tråde i [int] på Udvikleren.dk</description>
    <link>http://www.udvikleren.dk/</link>
    <pubDate>Wed, 29 Apr 2026 04:15:10 GMT</pubDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Udvikleren.dk RSS Feeder</generator>
    <ttl>60</ttl>
    <item>
      <title>java-Hvordan converter man "int" til "boolean"</title>
      <description>Hej jeg har lavet denne kode men får fejlen at den ikke kan: converte "svar" fra "int" til "boolean". kan du i hjælpe mig?&lt;br /&gt;&lt;br /&gt;import java.util.Scanner;&lt;br /&gt;public class quiz {&lt;br /&gt;  static void main(String [] args) {&lt;br /&gt;  int svar;&lt;br /&gt;  &lt;br /&gt;  svar = Integer.parseInt(args[0]);&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  System.out.println("hvad er 5+5; ");&lt;br /&gt;  Scanner input = new Scanner(System.in);&lt;br /&gt;  &lt;br /&gt;  svar = input.nextInt();&lt;br /&gt;  &lt;br /&gt;  if(svar = 10){ //fejlen er på denne linje&lt;br /&gt;   System.out.println("korrekt du må være inteligent");&lt;br /&gt;  }else{&lt;br /&gt;   System.out.println("ukorrekt du må være uinteligent");&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt;}</description>
      <link>http://www.udvikleren.dk/forum/42794/java-hvordan-converter-man-int-til-boolean/</link>
      <pubDate>Sat, 08 Feb 2014 18:04:32 GMT</pubDate>
    </item>
    <item>
      <title>char / int system, C</title>
      <description>Jeg har et problem med noget kode som jeg ikke kan få til at virke. Problemet består i noget jeg ikke helt kan forstå selv, men jeg ved da hvad jeg vil gøre, så det kan i da lige få med!&lt;br /&gt;&lt;br /&gt;Hele koden:&lt;br /&gt;&lt;div class="codeboxheader" id="code_2095493540" onclick="ToggleCodeBox(this.id);"&gt;&lt;img id="code_2095493540_arrow" src="/images/icons/codeboxarrow_down.gif" alt="Fold kodeboks ind/ud" title="Fold kodeboks ind/ud" /&gt;C kode&amp;nbsp;&lt;/div&gt;&lt;pre id="code_2095493540code" style="border-top: 0px; display: none;"&gt;&lt;ol&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;  main.c&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;  SekundOmregner&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;#include&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;Prototype&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; user_instr(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; convert_seconds(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;mins, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;secs);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; need_zeros(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; input);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; main ()&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; hours[&lt;/span&gt;&lt;span style="color: #800080;"&gt;128&lt;/span&gt;&lt;span style="color: #000000;"&gt;], mins[&lt;/span&gt;&lt;span style="color: #800080;"&gt;8&lt;/span&gt;&lt;span style="color: #000000;"&gt;], secs[&lt;/span&gt;&lt;span style="color: #800080;"&gt;8&lt;/span&gt;&lt;span style="color: #000000;"&gt;];&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    user_instr();&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;\n\nPlease enter the ammount of seconds you wish to convert: &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    scanf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;%d&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000;"&gt;seconds);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    convert_seconds(seconds, &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours, &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000;"&gt;mins, &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000;"&gt;secs);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;%d seconds is equal to: &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;, seconds);    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;\n\n%s Hours\n%s Minutes\n%s Seconds&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;, hours, mins, secs);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;\n\n%s:%s:%s&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;, hours, mins, secs);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; user_instr(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt;){&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Welcome to the Seconds converter program\n&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Enter any given ammount of seconds to convert it\n&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    printf(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;into hours, minutes and seconds&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; convert_seconds(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;mins, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;secs){&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; temp_hour, temp_min, temp_sec;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;Convert seconds to hours (first minutes, then hours)&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;    temp_hour &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds&lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    temp_hour &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; need_zeros(temp_hour);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;Minutes left from hours&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;    temp_min &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds&lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours&lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    temp_min &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;mins &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; need_zeros(temp_min);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;Seconds left from minutes&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;    temp_sec &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; seconds &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; ((&lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;hours &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; (&lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;mins &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;60&lt;/span&gt;&lt;span style="color: #000000;"&gt;));&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    temp_sec &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt;secs &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; need_zeros(temp_sec);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; need_zeros(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; input){&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;char&lt;/span&gt;&lt;span style="color: #000000;"&gt; temp[&lt;/span&gt;&lt;span style="color: #800080;"&gt;20&lt;/span&gt;&lt;span style="color: #000000;"&gt;];&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt;(input &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;){&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;        sprintf(temp, &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;%02d&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;, input);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; temp;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Jeg får et input som er int, antal sekunder. Dem sender jeg videre til funktionen convert_seconds. Den udregner så timer, minutter og sekunder. Det var fint nok. Så ville jeg have sådan at når et tal er under 10, så skal der skrives et 0 foran, f.eks. 9 -&amp;gt; 09, 5 -&amp;gt; 05.&lt;br /&gt;&lt;br /&gt;Det sker i need_zeroes, men der går det galt, for den skal smide int'en ind i en char. Kan ikke finde ud af hvorfor den ikke gider :/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
      <link>http://www.udvikleren.dk/forum/35345/char-int-system,-c/</link>
      <pubDate>Mon, 12 Sep 2011 13:43:33 GMT</pubDate>
    </item>
  </channel>
</rss>