C/C++ Beginner's Guide and Post Basic Questions here

clmlbx

Technomancer
I read some where that best books to start learning c++ is "Thinking In C++ 2nd Ed. - Vol 1 & vol 2".. should I start from that..

what do I know in c+.., I can say confidently that I should know at least 40% of c++, I believe so.. By self learning now I am thinking to start reading book which I have left.. But I wish start from scratch..

I have OBJECT-ORIENTED PROGRAMMING WITH C++ third edition by E BALAGURUSAMY..

which is best book for c++ between those two or any other to learn c++
 

abhijangda

Padawan
Thinking in C++ by Bruce Eckel is wonderfull book. It takes you to the depth of C++. I have read that book twice and really it is an awesome one. It is not only for beginners but for experts also. After it go for The C++ Programming by Bjarne Stroustrup, this one is relatively some what harder to understand as compare to Thinking in C++, but is an excellent reference. You will find everything in this book. Also,you can read C++ Primer it is a good one too. But, mostly reading Thinking in C++ will make you a good C++ programmer. Also, just throw Balaguruswami, Yashwant Kanetkar, Sumita Arora etc. book's in dustbin. Also, use a modern compiler like gcc or msvc++.
 

clmlbx

Technomancer
well I am using codeblocks, I bought that book when I started to learn then when I knew it is not good I kept aside and started learning from internet but after learning-practicing a lot I feel I have missed some basic core concepts so thinking to start from basic..

so was looking forward for thinking in c++ second edition volume one and two
 

utkarsh73

Journeyman
Starting reading Thinking in C++ volume-1 2nd edition today. Almost finished first 2 chapters. A fantastic book, as is always the case with PHI/Pearson publication books.
 
OP
Liverpool_fan

Liverpool_fan

Sami Hyypiä, LFC legend
Trapping Keyboard to make your output window "hang"? No I am NOT having that here. Posts deleted.

For all my efforts, great way of ignoring it.
You shouldn't be using _getch() either. It is a non-standard function as well and it is as bad as using the compiler you used. Use getchar or cin.get to read characters (Note input is buffered). And there's no point of either clearing a screen or trapping a keyboard output. Console programs aren't supposed to behave like that. And an IDE like Geany does that job for you automatically.

Forget about whatever you did in the you-know-what compiler. Read your book (yes thinking in C++) as if it's a new language you're learning.
 

utkarsh73

Journeyman
Ok, My mistake, I understand now. But then, how do I see my output?? There must be a way to see that output window. I m not able to figure it out.

What I use as "cin.get()" or "cin.getline(<string name>,<size>) " is correct then??
 
OP
Liverpool_fan

Liverpool_fan

Sami Hyypiä, LFC legend
The OP has clearly mentioned everything. And use an IDE like Geany.

What I use as "cin.get()" or "cin.getline(<string name>,<size>) " is correct then??
Why are you insisting on "trapping" your keyboard input to see output. How hard it is for you to run a couple of commands for every program or use an IDE like Geany.
 

utkarsh73

Journeyman
Why are you insisting on "trapping" your keyboard input to see output. How hard it is for you to run a couple of commands for every program or use an IDE like Geany.

I just want to see what output my program is producing, thats all. I don't intend to trap my keyboard input. It is not at all hard for me "run a couple of commands for every program" but I really don't know what are those "couple of commands" which can help me see my output(Downloading Geany now).

I think I better start reading the book: maybe I can find something in there.
 
OP
Liverpool_fan

Liverpool_fan

Sami Hyypiä, LFC legend
I just want to see what output my program is producing, thats all. I don't intend to trap my keyboard input. It is not at all hard for me "run a couple of commands for every program" but I really don't know what are those "couple of commands" which can help me see my output(Downloading Geany now).

I think I better start reading the book: maybe I can find something in there.

You didn't read my original post of this thread did you?

hmm, no idea about it as i always code under Linux and using terminal is butter compared to windows Command Line

You can always use cygwin in Windows, if you wish. vim + gcc can work for you there.
 

ico

Super Moderator
Staff member
I just want to see what output my program is producing, thats all. I don't intend to trap my keyboard input. It is not at all hard for me "run a couple of commands for every program" but I really don't know what are those "couple of commands" which can help me see my output(Downloading Geany now).

I think I better start reading the book: maybe I can find something in there.
I would say - get rid of that thought. Start using Geany.
 

Vyom

The Power of x480
Staff member
Admin
I just want to see what output my program is producing, thats all.

I don't know what's the fuss all about.
In the *that which shall not be named* compiler, you can always view the output by going to Window -> Output OR Alt + F5. So no use of getch() there.

In Code::blocks in windows, you don't need something akin to getch() since, the the compiler does automatically for you.
So on and so forth for every compiler. So, problem?
 

utkarsh73

Journeyman
^^The problem is I don't know the Alt+F5 equivalent in MS Visual C++. Only this I want to know. Now I am using MinGW which has no such fuss. But if you know any such "Alt+F5 equivalent", please tell me.

P.S.:-Now I m not using system("pause") or cin.get() or any such thing to trap keyboard input.
 

dashing.sujay

Moving
Staff member
^^The problem is I don't know the Alt+F5 equivalent in MS Visual C++. Only this I want to know. Now I am using MinGW which has no such fuss. But if you know any such "Alt+F5 equivalent", please tell me.

P.S.:-Now I m not using system("pause") or cin.get() or any such thing to trap keyboard input.

I also have not been able to find a solution for this. :confused:
 

utkarsh73

Journeyman
^^I suggest u start using MinGW. Compiling and executing is done by commands in the command prompt so the problem will never arise.
 
Top Bottom