c/c++... help the newbie

northrop

grumman
Joined
Sep 27, 2005
Messages
10,445
I’m in this Intro to programming course at my Univ. (with Math and Comp. Science being my major), and with the semester almost over, I realized I haven’t learned a thing. It’s not just me, but the professor isn’t the best either. So anyway, I was wondering what are some good books and/or websites on C/C++ you guys can recommend me so that I can learn it on my own over the winter break. The book we use is called “C by Dissection” 4th edition, Pohl, Kelley. I really dislike its format.

I’m also using this SSH client from school, and from what I was told it will only compile in C, but not C++. I’ve no idea how that works. It’s called Pico and is Unix based. I’m open to any suggestions if I should switch to something else. thank you for all the help!
 

GAMMA_BLADE

Limp Gawd
Joined
Aug 28, 2004
Messages
170
The BEST book for programming in c is "The C Programming Language (2nd Edition)" Link. if you're running *nix i suggest using emacs for you text editor (the text editor up to you but i love emacs) and the proper compiler for the language. gcc is the best c complier in my opinion. Yet again there are others just check it out. Good luck with your class. C is a damn cool language with really cool capabilities. Try to have fun with it.
 
Joined
Apr 4, 2003
Messages
836
northrop said:
I’m in this Intro to programming course at my Univ. (with Math and Comp. Science being my major), and with the semester almost over, I realized I haven’t learned a thing. It’s not just me, but the professor isn’t the best either. So anyway, I was wondering what are some good books and/or websites on C/C++ you guys can recommend me so that I can learn it on my own over the winter break. The book we use is called “C by Dissection” 4th edition, Pohl, Kelley. I really dislike its format.

I’m also using this SSH client from school, and from what I was told it will only compile in C, but not C++. I’ve no idea how that works. It’s called Pico and is Unix based. I’m open to any suggestions if I should switch to something else. thank you for all the help!


1) pico is not a compiler. it is a text editor. gcc or cc is probably the compiler you're using. try typing g++ where you'd normally type gcc to compile a c++ file.

2)i highly doubt that you've learned nothing in this intro class:

did you learn how to count in binary? did you learn how to declare variables? did you learn when you use what type? did you learn boolean logic? did you learn how to write loops? did you learn how to use arrays? did you learn how to write functions? did you learn how to translate an algorithm into c/c++? did you learn how to do input/output with the programs?

intro classes are EXTREMELY difficult to teach, so i'd give the prof a break unless you actually don't know any of these things.

i would recommend either "the c programming language," "the c++ programming language," or for a more beginner's approach, one of the o'reilly books on the subject... or, read your own textbook!
 

mikeblas

[H]ard|DCer of the Month - May 2006
Joined
Jun 26, 2004
Messages
12,776
northrop said:
and with the semester almost over, I realized I haven’t learned a thing. It’s not just me,
I'd talk with the professor. Perhaps thinking through that conversation before you have it will make you realize that really is at least partially your lack of effort, attendance, or attention; or that you have, indeed, learned something.

northrop said:
It’s not just me, but the professor isn’t the best either.
Then I'd talk with the department chair. Again, preparing through this conversation should give you time to reflect on what really happened. If you're accusing the professor of being incompetent, then you need to make sure you've really considered the ramifications of your accusation.
 

northrop

grumman
Joined
Sep 27, 2005
Messages
10,445
did you learn how to count in binary? – no; he did explain a little on this subject, but concluded that it won’t be needed for this class
did you learn how to declare variables? - yes
did you learn when you use what type? - yes
did you learn boolean logic? - no
did you learn how to write loops? - yes
did you learn how to use arrays? - yes
did you learn how to write functions? - no
did you learn how to translate an algorithm into c/c++? - no
did you learn how to do input/output with the programs? – no?

thank you for the tip on the books. And sorry for the mistake; gcc is the compiler that we use.
 

BinarySynapse

[H]F Junkie
Joined
Feb 6, 2006
Messages
15,103
northrop said:
...
did you learn how to write functions? - no
...
did you learn how to do input/output with the programs? – no?
...

So you didn't compile this program, (which has been in every C programming intro I've ever seen)?

Code:
#include <stdio.h>

int main()
{
   printf("Hello World\n");
   return 0;
}

If you did, then you did learn to write functions as "int main()" is the function. And you learned at least output as the printf line outputs to the standard output device, which is usually the monitor.
 

northrop

grumman
Joined
Sep 27, 2005
Messages
10,445
Sorry, must have misunderstood the question. When I went to my lecture today, the topic was “Function Prototypes; Invocation and Definition.” So I thought we’re just getting into the whole “function” thing. So yeah… I guess I’ve learned a fair bit, but I guess I went into the course and expected more then I should.
 

jukem

n00b
Joined
Mar 27, 2005
Messages
26
Hi, I started out in the same situation as you. I entered my intro to programming class a total newbie. Do you have lab sessions that are part of the class? I found that the labs were very helpful to me.

Anyway I found this site very helpful to me when I didn't understand something in my lecture: www.cprogramming.com it has alot of good tutorials about most of the things that you probrably went over in lectures. If you ever find yourself confused about a concept that site usually will explain it better for beginners like us.
 
Joined
Apr 4, 2003
Messages
836
northrop said:
did you learn how to count in binary? – no; he did explain a little on this subject, but concluded that it won’t be needed for this class

well... this would be something i would cover, but i guess it isn't 100% necessary
did you learn boolean logic? - no
did you learn how to write loops? - yes

how did you write a loop without using boolean logic?
did you learn how to translate an algorithm into c/c++? - no

do you never had an assignment this semester?

did you learn how to do input/output with the programs? – no?

i know you've done at least this much... not much point in programming anything if you can't see your results.

point being, these are intro topics. they are very important, and so i almost guarantee you've gone over most of them. this is what an intro course is.

thank you for the tip on the books.

no prob!
 

mikeblas

[H]ard|DCer of the Month - May 2006
Joined
Jun 26, 2004
Messages
12,776
nameless_centurian said:
not much point in programming anything if you can't see your results.
If I were a CS prof, I'd teach without explaining I/O for a little while. I'd have the students learn how to use the debugger this way.
 

northrop

grumman
Joined
Sep 27, 2005
Messages
10,445
Never have I once heard him use “Boolean logic” in the lecture. I also haven’t come across this term in my book, so perhaps it’s just another misunderstanding on my part. We have in fact gone over some logic in class.

We’ve had three assignments this semester (12 weeks now, with 3 weeks to go). Our first assignment was to write a calendar. He gave us a code for one month (it would print September 2006 only), and all we had to do is add another loop to make it work for the whole year (plus some other variables).

Pretty much, only about 10 people (out of 45 that are enrolled in his class) come to lecture. From the 9 chapters that we were spouse to cover in class (according to the syllabus) we’re just barely starting on chapter 4.

Our 2 hr Thursday lab with our TA is our only hope in this class. She’s very helpful all the time, and can actually show us how to do stuff in C.
 

drizzt81

[H]F Junkie
Joined
Jan 21, 2004
Messages
12,361
mikeblas said:
If I were a CS prof, I'd teach without explaining I/O for a little while. I'd have the students learn how to use the debugger this way.
one of my classes actually did that. However it was not a "into to C" class, but the "into to computer architecture"; we got to write programs in machine code and use a debugger to "watch" them execute.
 

Empyrean

Limp Gawd
Joined
May 27, 2005
Messages
327
Pretty much, only about 10 people (out of 45 that are enrolled in his class) come to lecture. From the 9 chapters that we were spouse to cover in class (according to the syllabus) we&#8217;re just barely starting on chapter 4.

A lot of people don't attend intro classes because they already know the material. A lot of people going into comp sci already know all the basics, but still need some "intro" course requirement before they can apply for the major. I could of skipped my "intro" course, but I enjoy classes so there was no point to that.

It's too bad you couldn't make it through all the chapters, sometimes classes don't move at the anticipated pace. I'd recommend you cover the remaining chapters individually over break though.
 
Top