Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Newbee Programming

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Posts
    6

    Newbee Programming

    My first post of many regarding programming. Hello Anitonline users and hello newbee programmers. I am a newbee at programming who has been struggling and it can be hard and discuraging. My attempt with this post is to show and help newbees in there programming efforts by telling what I have done on my journey to become better as a computer enthusiest. My posts will help newbees because it will show others out there that they are not the only ones as I once felt. My Journey began learning the basics in a new programming language called Python. I struggled but the basics came with dedication. Then I moved to C,C++ using Dev C++ 4.9.9.0. I just started and I made my first Hello Program wiht it even though it just flickers on the screen. Thats a big deal to me. As get farther into the language I will tell you tips on what I used to learn and get better. It always helps to get a programming guru who is willing to assist you with questions and what a great site Antionline is for that.

    To use these free compilers and tutorials on Python and Dev C++, go to these cool sites:
    www.python.org
    www.bloodshed.com
    Computers are worlds for exploration!!!

  2. #2
    when you write a prog in c++ put this little snippet at the end

    int x;
    cin << x;
    return 0;
    }

    That should keep it on the screen until you type in a number.

  3. #3
    not neccessary at all !

    you can include the stdlib header file and use the system function to call the windows pause command like this


    #include <iostream.h>
    #include <stdlib.h>

    int main()
    {
    cout << "hi \n";
    system("pause");
    return 0;
    }


    this will wait until a key is pressed to finish the program ...
    [gloworange][shadow]www.geocities.com/dia_byte0 [/shadow] [/gloworange]

    No To 1559 !

    Signature image is too tall!

  4. #4
    hi C_programmer, welcome to the forums.

    perhaps you might like the tutorial i have written for newbies wanting to learn C.

    you can view it on my site here.

    atm there is only a beginners tutorial, but the sequel will be online tonight i think (i have almost finished it).

    let me know what you think of it

    regards

    White Scorpion

  5. #5
    when you write a prog in c++ put this little snippet at the end

    int x;
    cin << x;
    return 0;
    }
    Ugh... one small problem. When you do a cin, your >> don't go into cin, they go into your variable.


    Damn, I need to read posts on this site more often.

  6. #6
    well i guess my solution was better i always use this to keep the console open ...
    [gloworange][shadow]www.geocities.com/dia_byte0 [/shadow] [/gloworange]

    No To 1559 !

    Signature image is too tall!

  7. #7
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    Dia_Byte, your solution will work assuming the person is compiling the code on windows. You have to remember that it isn't always the case. Also, I would discourage using system calls in general because they usually slow programs down and cause code to not be portable.

    The cin method, although not amazing, is probably slightly more correct (c++ wise) than yours (that isn't to say it works better). I disagree with you that your solution is better.

    ac

  8. #8
    well the guy said that he's using DEV_CPP

    he is using windoz that's why i gave him my suggestion .
    [gloworange][shadow]www.geocities.com/dia_byte0 [/shadow] [/gloworange]

    No To 1559 !

    Signature image is too tall!

  9. #9
    Junior Member
    Join Date
    Nov 2004
    Posts
    6
    Well guys I had figured it out!!!

    #include <iostream>

    int main()
    {
    cout<<"My Text!!!\n";
    system("PAUSE"); //This is what works in Dev C++ to keeping the window open!!!
    return 0;
    }

    My code was always working but the linker option in Dev C++ 4.9.9.0 is not preset to the right options!?!?!? Go figure!!! Why, I do not know but to all newbees looking at this with the same compiler do the following:

    Tools-->Compiler Options-->Settings-->Linker-->Do not create a console window-->*NO*

    You will be set =)
    Computers are worlds for exploration!!!

  10. #10
    well i'm glad that you solved your problem

    your welcomed

    and as an advice just keep all compiler options default so you won't have any problems
    [gloworange][shadow]www.geocities.com/dia_byte0 [/shadow] [/gloworange]

    No To 1559 !

    Signature image is too tall!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •