Beginning C++

  • Thread starter Keine Zeit
  • 10 comments
  • 1,108 views
81
KeineZeit
I've been programming in C++ for a little while now and know all the basics but when it comes to actually structuring a programming and thinking of a way to make it work (when I actually do a get an idea) I get stuck. I'll write the first few then can't think how it will actually work and what commands I need for later in the program. If anyone could give me any tips on how to actually plan out and get a program written I would appreciate it.
 
Ohhh man - You have NO idea what you're getting into ;-)

Back in the days when I was edumacated in (in the days when Pascal ruled the DOS world supreme) - We spend hours on this subject. But - Currently, stuck at work , I have no time to put together a longer post on the subject.

But one thing, and you gotta spend at least 50% of your project time on this :

> What does your your program need to do <

And "Hello World" is a not a bad example.

"I need to make a program that will draw a box on the screen, and in that box, it will type, "Hello World""
"My program will also feature a "Close" button, which, when pressed, will exit the program"..

That's the requirement specs for "Hello World"...

I'll update the post a little later if I find some time....
 
Only 50%? I think I spent nearly 70% of my time outlining what the program is going to do, what basic commands I am going to have, and how they relate. Web diagrams and box diagrams help alot, along with flow charts, etc. Do this before you sit down and write any code...
 
Only 50%? I think I spent nearly 70% of my time outlining what the program is going to do, what basic commands I am going to have, and how they relate. Web diagrams and box diagrams help alot, along with flow charts, etc. Do this before you sit down and write any code...

Post edited accordingly - I did mean At Least 50%...
 
Thanks for the tips. I knew it was important to plan out the program first I just didn't realize how much planning was really necessary.
 
does anybody here use Bloodshed Dev-C++?? also, can I ask a few questions about programming in C++??
 
You can always ask. :)

Btw, I don't use Bloodshed Dev-C++
 
I guess your questions have been answered. If not, feel free to ask for help. But understand one thing, I will not do your homework, I will just help you along the way when you are stuck. And you know quite well why that is: learn from your mistakes or short comings.
 
I'm getting confused about pointers.., what does it exactly do?? how do you pass a pointer to a function?? I need examples and explanations to really understand them, I think I'm about to fail my course.., F:censored:ING pointers..,
 
Pointers are indeed a bit harder to understand, but maybe this will help you on the way. And muzhogg also has a good explaination, with examples and more links to tutorials.

So, after having read the before: pointers are no more than variables that refer to a location in memory (address from a variable is obtained by using the '&').

And passing a pointer to a function is no different from passing a variable. With the exception that the receiving function must expect a pointer value (by using the '*'). Look at this example.

And failing a course is not an option. :dopey:
 
Back