I have taken an introduction course in C++ programming and I'm now looking for some C++ code example's which I could study before the course final test. I will try to follow the rule: If you would like to be an good authour, read a lot of books by excellent authours. I assume that the same rule is valid for programmers. I think there is a lot of good code example's with comments by posting Pro's on this forum, but it take's a lot of time to search and read all thread's that are listed here. Example's that I'am looking for should cover basic C++ upto Pointer's and Classes. I.e Input/output, Strings, Iteration, Selection, Functions (with references), Structures, File handling, Standard functions like RND , SQRT should be fairly large.

Pls post some link's to thread's that you think should be studied.

Recommended Answers

All 3 Replies

Well, why don't you just check out the code snippets section?
Plenty of good stuff about pointers can be found here.

The nicest code snippets I've ever seen on this forum, were the ones which you can find here (though they're more about C than about C++, I'd strongly want to suggest you to have a look at them (they illustrate some interesting coding techniques).

Thanks, I have not looked into the code snippets section before. Seams to be a lot of different example's to study.

Write a function int digit (int num, int k) that return kth digit of the positive number num. For example, if num is the integer 12435, then the call digit (num, 0) would returns the digit 5, and the call digit (num, 2) would returns the digit 4. Note that digits are numbered from right to left. (0,1,2,3,4…) in c++

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.