Newbie to Programming.

This is a discussion on Newbie to Programming. within the C Programming forums, part of the General Programming Boards category; Hello everyone. I am new to programming, i decided to learn C, because from what ive been reading most languages ...

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    1

    Post Newbie to Programming.

    Hello everyone.

    I am new to programming, i decided to learn C, because from what ive been reading most languages are based on this.

    I brought the book: C programming in easy steps.
    http://www.countrybookshop.co.uk/ima...184078203X.jpg

    Now Ive install the compiler, it's called dev-C++ (It can compile C and C++, and seemed easy so I got that) and Ive writen my first "Hello world" Program. Is it okay to use the run -> compile option on the software, is that the same as typing all that stuff in to the command prompt, because that didnt work for me.

    Now, I skimmed through the book, and everything is in command prompt. Im new so this maybe a stupid question, but cant I create programs that have an interface or something like that?

    Im moving on to variables next.

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    8
    It is possible to create GUIs for your program but I would not recommend it, considering your experience and knowledge

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,443
    > Is it okay to use the run -> compile option on the software,
    > is that the same as typing all that stuff in to the command prompt, because that didnt work for me.
    There's an option somewhere in that dialog which allows you to specify what the command line parameters will be.

    So where you would type on the command line
    myprog.exe input.txt

    There's a field on the dialog where you would enter
    input.txt

    Apart from that, it should be the same.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Creating a neat GUI will take a lot of work and experience. Consider Hello World:


    Console
    Code:
    #include <iostream>
    int main()
    {
        std::cout << "Hello World!\n";
        getchar();
    }

    Windows GUI
    Code:
    #include <windows.h>
    
    int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hInstNULL, LPSTR lpszCmdLine, int nCmdShow)
    {
      return MessageBox(
        NULL,
        "Hello World",
        "Tutorial Example 1",
        MB_OK|MB_ICONINFORMATION);
    }
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  5. #5
    Registered User wintellect's Avatar
    Join Date
    Mar 2006
    Posts
    24
    IMHO you're just starting C, so don't worry about GUIs at the moment. Get to grips with the concepts that the book you bought is presenting (I have that book too)!

    When you feel ready, may I recommend this book: http://www.amazon.co.uk/exec/obidos/...640125-4565469

    It taught me most of what I know and use today.

    Once you get to grips with C and how it works, you can then quite easily move onto graphical programs using a graphical library for C such as GTK+ (http://www.gtk.org/)

  6. #6
    Registered User RobJ's Avatar
    Join Date
    Apr 2006
    Location
    Bath, England
    Posts
    16
    Or you could use a more GUI-oriented language such as C# if you're looking to create a snazzy interface. There's no sense (IMO) putting all that effort in to try and generate a C GUI when the language is not really designed for the purpose. You can always perform computationally expensive processing in C and pass the data between a DLL and the application if you need the speed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. newbie: array question :(
    By cstudent in forum C Programming
    Replies: 2
    Last Post: 04-09-2008, 06:46 AM
  2. getting to grips with allegro and ms vc++ (newbie)
    By jimjamjahaa in forum C++ Programming
    Replies: 4
    Last Post: 11-18-2005, 06:49 PM
  3. Newbie in problem with looping
    By nrain in forum C Programming
    Replies: 6
    Last Post: 11-05-2005, 11:53 AM
  4. C++ newbie / linux not so newbie question
    By goldmonkey in forum C++ Programming
    Replies: 7
    Last Post: 12-13-2003, 11:27 AM
  5. Newbie Game Develpoers Unite!
    By Telenosis in forum Game Programming
    Replies: 10
    Last Post: 06-22-2002, 02:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21