| | |
Deitel's "C++ How To Program" exercise 2.18
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
I haven't read this whole thread, so I don't know what all those ... mean in your previous post.
did you try to compile it? Obviously not because it contains a few syntax errors, like missing declarations of variables.
when you want to count from 0 to (but not including) 12, most people code it like this:
did you try to compile it? Obviously not because it contains a few syntax errors, like missing declarations of variables.
when you want to count from 0 to (but not including) 12, most people code it like this:
for(i = 0; i < 12; ++i){ what compiler are you using? Your program still has several syntax errors and the compiler should have spit out several error messages. Did you fix them? or just ignore them? NEVER ignore errors and warnings. Nobody can help you very much if you don't post exactly what you tried to compile -- I forgot to being my crystle ball today.
•
•
Join Date: Aug 2005
Posts: 14
Reputation:
Solved Threads: 3
use your book and compare the syntax of what you wrote to examples in the book. if they look good, then do a dry run of your program on paper, write out each variable and what happens to its contents in each iteration of the loop. maybe youll find an error in your logic...(although in the last case its a syntax prob)
understand the concepts first, then attempt the code, unless it seems intuitive, dont just read the chapter and tackle the questions. understanding is a must.
understand the concepts first, then attempt the code, unless it seems intuitive, dont just read the chapter and tackle the questions. understanding is a must.
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: fstream to char and int array
- Next Thread: How to create a registry?
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph gui homeworkhelp iamthwee ifstream input int java lib library lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sorting spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






