Hi all~
I am learning C++ step by step with my BCB, and I try to write some simple code under console mode, but the result splashed no more than half a second when running my code. how could I see it clearly ?
Hi all~
I am learning C++ step by step with my BCB, and I try to write some simple code under console mode, but the result splashed no more than half a second when running my code. how could I see it clearly ?
Never end on learning~
Hey I know it is not the most sophisticated way of doing it, but it does the job...
hope that helps for now, but there are many other ways of doing it.Code:int main(void) { // you code here char c; cin>>c; //consoles waits for a char input before exiting. return 0; }
put getchar() above return 0 and that will work.
What is C++?
So that you don't have to include another header or create a new variable, just use get:
-PreludeCode:<snip the whole program> cin.get() return 0; }
My best code is written with the delete key.
yah that too...
What is C++?
Just read a book That's what I did when I first started learning C. I had no programming experience prior to that. Now I code in C++ well
Yah right...
Like us poor ppl are gonna pay 60$ for something they can find out here.
What is C++?
I did not buy any book. Just borrowed one I had no one to teach me too.
I have 2 wonderful books, and it is a pity that I could not figure it out right now. thanx, guy~Originally posted by billholm
Just read a book That's what I did when I first started learning C. I had no programming experience prior to that. Now I code in C++ well
one of my book is Thinking in C++, I was sometimes confused when reading it, would it be suitable for beginners just like me ?
Last edited by black; 05-12-2002 at 11:21 PM.
Never end on learning~
Yes that's a good book, but some parts of it assume that you have prior knowledge to C.
Try C++ Pimer (forgot the author) or The C++ Programming Language by Bjarne Stroustrup or any book that does not assume prior programming experience.
Black that is a nice Avatar.
What is C++?
yah~ I heard those 2 books before. I remember one of them have more than 1000 pages, right ? and the total would be 1800 pages or so, God~Originally posted by billholm
Yes that's a good book, but some parts of it assume that you have prior knowledge to C.
Try C++ Pimer (forgot the author) or The C++ Programming Language by Bjarne Stroustrup or any book that does not assume prior programming experience.
anyone could lend me time then ?
Never end on learning~
No no you don't have to read ALL of the pages
Just use the books as your reference. Consult it if you have a few programming questions in mind then apply them to your codes
That's what I did.
if you don't want the user to have to press a key, and would rather have a delay, just include <windows.h> and use the Sleep(..) function:
Code:#include <iostream> #include <windows.h> using namespace std; int main(int argc, char *argv[]) { cout << "Hello World"; Sleep(1000); // Sleep(Number Of Milliseconds); cout << "\n1 Second Delay!"; Sleep(1000); return 0; }
"There are three kinds of people in the world...
Those that can count and those that can't."