Thread: Compile (windows app n00b)

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    33

    Compile (windows app n00b)

    I would like to know how to turn a C source code into a windows graphical application. I´m using Devcpp, but VB could also do....

    If you have any links to good tutorials or if you don't mind giving it a try, so i could examine the structure..

    Code:
    #include <stdio.h>
    
    int main()
    {
            int user_input = 1;
            int loop_count = -1;//starts with -1 because the exit input (final input) is ignored in the count
            float sum = -1;
    
            printf("\nThe program calculates the average of scores you enter.\n");
            printf("End with a negative integer.\n");
            printf("\n");
    
            do
            {
                    printf("Enter score (3-10): ");
                    sum += user_input;//used to determine the sum for the average
                    loop_count++;
            }
            while(scanf("%d", &user_input)>=0);
    
            printf("\nYou entered %d scores.\n", loop_count);
            printf("Average score: %.2f\n", sum/loop_count);
            return 0;
    }

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    GUI programming is not trivial -- that code as a GUI will be 5-10 times as long as it is now.

    To learn how to program for the windows native GUI, start googling "winapi GUI"
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  2. Compile under linux, To windows
    By Pandora in forum Linux Programming
    Replies: 0
    Last Post: 04-12-2003, 12:55 PM
  3. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  4. newbie question about using windows app in Dev C++
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 06-09-2002, 10:50 PM
  5. Turning a Console APP into Windows.
    By Darkflame in forum C++ Programming
    Replies: 3
    Last Post: 09-14-2001, 03:10 AM