-
November 9th, 2004, 08:14 PM
#1
Junior Member
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!!!
-
November 9th, 2004, 08:44 PM
#2
Member
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.
-
November 20th, 2004, 05:41 PM
#3
Member
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 ...
-
November 20th, 2004, 09:33 PM
#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
-
November 21st, 2004, 02:32 AM
#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.
-
November 25th, 2004, 04:14 PM
#6
Member
well i guess my solution was better i always use this to keep the console open ...
-
November 26th, 2004, 01:44 AM
#7
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
-
November 26th, 2004, 05:44 PM
#8
Member
well the guy said that he's using DEV_CPP
he is using windoz that's why i gave him my suggestion .
-
November 27th, 2004, 07:35 PM
#9
Junior Member
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!!!
-
November 30th, 2004, 03:31 PM
#10
Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|