473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Improving knowledge of C++

MrPickle
100 100+
I know basic C++ and I can make basic command prompt programs and things with OpenGL but I don't know how to actually continue learning. All the ideas I come up with are either way to hard or way to easy so I don't learn things.

So, how can I continue learning? I'm pretty sure that this barrier isn't uncommon.
I want to be as good as I possibly can at C++, just it's a bit hard when I don't know how to advance.

Another thing I should probably say is that I'm 14 and I live in a small town. My school doesn't teach any languages nor is there anybody in my town that teaches it. :(
Jul 27 '08 #1
11 1540
JosAH
11,448 Expert 8TB
Try to buy "The C++ Programming Language IIIrd Edition" by Bjarne Stroustrup,
the creator of the language. It's a brick of a book, full of little examples. When
you have studied that, cover to cover, you really know the C++ language.

kind regards,

Jos
Jul 27 '08 #2
MrPickle
100 100+
As my birthday is rapidly approaching I could ask for that :o, I'm sure it has everything as, well, it was written by the creator of C++.
Jul 27 '08 #3
oler1s
671 Expert 512MB
Try to buy "The C++ Programming Language IIIrd Edition" by Bjarne Stroustrup,
I strongly disagree. Stroustrup's book is not appropriate except for already experienced C++ programmers. His book is like a reference dump. You're better off with books like Accelerated C++, Modern C++, and Effective C++.

All the ideas I come up with are either way to hard or way to easy so I don't learn things.
Try to break a problem down. Give us an example of something you want to make, but find too difficult. We can tell you what kind of knowledge you are lacking.
Jul 27 '08 #4
JosAH
11,448 Expert 8TB
As my birthday is rapidly approaching I could ask for that :o, I'm sure it has everything as, well, it was written by the creator of C++.
I think it would be a great birthday present. It really is a book to chew on;
sometimes it takes hours to read and understand a few pages but in the end
it really pays back. On top of that, Bjarne is a good author an personally I find
his books entertaining to read; that book is worth much more than any of those
lousy "teach yourself in 21 days" or "xxx for dummies" books; those aren't
worth the trees that had to die for it.

kind regards,

Jos

ps. and Happy Birthday already.
Jul 27 '08 #5
JosAH
11,448 Expert 8TB
I strongly disagree. Stroustrup's book is not appropriate except for already experienced C++ programmers. His book is like a reference dump. You're better off with books like Accelerated C++, Modern C++, and Effective C++.
I stronglier disagree ;-) I agree that Bjarne's book is not an easy book but who
demanded that books should be easy to digest? If you carefully read the first
chapters of CPPPL you'll notice that almost nothing is assumed. The only
assumption is that you're a serious reader, not someone who wants to finish
another 'how to bluff your way into' crappy book in 21 minutes.

kind regards,

Jos
Jul 27 '08 #6
MrPickle
100 100+
Something I guess I want to make is something to read a bmp file and then using OpenGL to render a grid of squares, with the squares getting higher the whiter a colour is in the bmp. That'd test both my C++ and OpenGL skills.

I could do the OpenGL bit if I had the bmp file in an a 3D array or something with RGB values.

I looked into it, but I just got tutorials which give you the code on a platter. I dislike tutorials like that. It doesn't make your learn :(

I prefer tutorials that give indepth descriptions of what you need to do, and then let you do the coding yourself. Unfortunately these seem hard to come by.
Jul 27 '08 #7
oler1s
671 Expert 512MB
but who demanded that books should be easy to digest?
The ones who want to buy a C++ book? To be more precise, people want usable books. I fully acknowledge and agree with your sentiment about the bad 21 minute type books. I wasted money on useless books before I learned enough to pick out the right C++ books, and my bitterness can come across in some of my posts...

That said, a good book is usable for said reader. Stroustrup's book is like a reference dump for experienced readers. There is no hesitancy to use jargon, and the structure suggests an experienced programmer who wants to refine his C++ knowledge. It's a great reference book, when you can actually program to a respectable level.

Stroustrup is currently writing another book geared toward beginners. Is one better than the other? No, the target audience and the respective content in the book is different, that's all. But there's no point in quibling over this, because our OP's problem is not an issue of knowing enough C++, at the moment.

I prefer tutorials that give indepth descriptions of what you need to do, and then let you do the coding yourself
More importantly, what you need to learn is how to break apart problems and design solutions. With a tutorial that only omits the code, someone has thought about the problem, devised a solution, laid out the details for you. The only thing they left out was the transcription from steps to code. Do you want to keep transcribing logical steps to code? Or do you want to learn how to figure out the logic and design yourself?

You have a BMP file. Somehow, you need the pixel values of the BMP file to end up in a 3D array. You need to figure out how. This is what programmers do. We think about a problem, and use our knowledge and experience to come up a with a good solution. The first step might be to research the BMP format. It will tell you precisely what you are dealing with. Have you examined the BMP format yourself?
Jul 27 '08 #8
MrPickle
100 100+
I researched the format yes, but it's in binary and I've never dealt with binary files before.

That's the sort of stuff I want to be able to do, come across a problem and think of a solution by myself.
Jul 27 '08 #9
boxfish
469 Expert 256MB
Hi,
I'm 14 too. I'm glad there are more 14 year old programmers out there. I learned most of the C++ I know from a course I took at a university. I enjoyed it, so I'm going to take more courses there. I've been working on an open GL project, which started out as just copy and pasted code from a tutorial. (this tutorial) I used the files that loaded images without knowing how they worked. After some programming on it, I wanted to use masked textures, which the tutorial does not cover, so I looked up how to do that, and then I had to figure out how to load black and white bitmap files. They're similar to the color bitmap files that I had the code for, but I still had to take the code all apart and learn how it worked and redo it. I don't think you're in danger of not learning if you copy and paste code from tutorials, as long as you're working on your own project. Also, courses at a university are great if you can get them. So are programming contests. I always like doing them, even though I always lose.
Good luck.
Jul 27 '08 #10
oler1s
671 Expert 512MB
I researched the format yes, but it’s in binary and I’ve never dealt with binary files before.
Have you ever worked with files before? If you have done any sort of file I/O, you have worked with binary files, because all files are in binary. It’s all a question of interpretation. You most likely interpreted the file as text, and used logic that would be appropriate for text. For example, you grabbed “lines” of the file (basically read until you hit the binary equivalent of the newline), and then worked your logic on each line.

Here, you have something arbitrary called a BMP (it’s something Microsoft made up). So you have two options now. You can either try to study the I/O mechanism available to you, see how you can use it in a more controlled manner, and try to use it to read this file that is broken up into an arbitrary manner (instead of “lines”). Then again, this is made by Microsoft. Programmers who want to interact with the Windows system, as you should already know, use the Windows API. Perhaps the Win32 API already has some mechanism for handling BMP files? Try looking that up.
Jul 28 '08 #11
Banfa
9,065 Expert Mod 8TB
Perhaps the Win32 API already has some mechanism for handling BMP files? Try looking that up.
No it doesn't, it has functions for handling bitmaps in memory but loading it in from the file is the programmers responsibility, there is no assistance from the WIN32 API.

MFC had classes to handle it for you and I imagine .NET does too.
Jul 28 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wensheng | last post by:
Hi, I wrote a small template engine called spytee. Like any template enigne, it take a text(html) template file as input, process the variable tags in the file, and display the resulted text. The...
1
by: Brian Basquille | last post by:
Hello all. Have been working on the Air Hockey game on and off for a couple of weeks now.. but have had plenty of other assignments to keep me busy along with it. But i would like some...
1
by: Robin | last post by:
For an asp.net project that is deployed to a load balanced web servers, are there any performance changes that can be made in .Net runtime or IIS 6? Also are there any additional tips for...
2
by: Irfan Akram | last post by:
Hi Guys, I am in search of some innovative ideas in improving the interface of Online Marking System. At the moment it has some good functionality, but lacks a professional interface. Is...
1
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet...
1
by: mjheitland | last post by:
Hello, does anyone know if an update is available (or at least planned) for the much cited standard reference IMPROVING .NET APPLICATION PERFORMANCE AND SCALABILITY? link:...
10
by: Jo | last post by:
Hi there: I m wondering what can I do to improve my code, everytime I am coding I feel like it could be done better. I started on c# a good months ago and feel conformtable but sometimes I Need...
3
by: Jeff | last post by:
..NET 2.0 I've created a window consisting of a treeview control and a tabcontrol. When a leave in the treeview is clicked then the code should check if the specific tabpage already exists in...
32
by: Pedro Borges | last post by:
Hi guys, Is there a way to improve the interpreter startup speed? In my machine (cold startup) python takes 0.330 ms and ruby takes 0.047 ms, after cold boot python takes 0.019 ms and ruby...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.