Click here to Skip to main content
15,894,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 19:12
protectorChristian Graus13-May-07 19:12 
GeneralRe: Hello world... please help Pin
WakenDJ13-May-07 19:28
WakenDJ13-May-07 19:28 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 19:30
protectorChristian Graus13-May-07 19:30 
GeneralRe: Hello world... please help Pin
WakenDJ13-May-07 19:40
WakenDJ13-May-07 19:40 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 20:39
protectorChristian Graus13-May-07 20:39 
GeneralRe: Hello world... please help Pin
WakenDJ13-May-07 20:44
WakenDJ13-May-07 20:44 
GeneralRe: Hello world... please help [modified] Pin
Nelek13-May-07 20:49
protectorNelek13-May-07 20:49 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 20:54
protectorChristian Graus13-May-07 20:54 
WakenDJ wrote:
int num;
for(num=0;num<=10;num++)
printf("*\n");


this is a good start. Now think, how many times does this loop fire ? The answer is 11. You want to do this:

for(num=1;num<11;num++)

to count from 1 to 10.

Now ask yourself, you want to print out 10 lines, right ? The first line has 1 * in it, the second has 2, and so on. So, how will you know on each line, how many stars to print out ? And, can you write a loop to print those stars out ? Then you just need after your loop to print a \n to go to the next line. Actually, I thought it was \r\n.




Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: Hello world... please help Pin
WakenDJ13-May-07 20:58
WakenDJ13-May-07 20:58 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 21:46
protectorChristian Graus13-May-07 21:46 
GeneralRe: Hello world... please help Pin
WakenDJ13-May-07 22:14
WakenDJ13-May-07 22:14 
GeneralRe: Hello world... please help Pin
Christian Graus13-May-07 22:34
protectorChristian Graus13-May-07 22:34 
GeneralRe: Hello world... please help Pin
Nelek13-May-07 22:53
protectorNelek13-May-07 22:53 
GeneralRe: Hello world... please help Pin
Nelek13-May-07 22:27
protectorNelek13-May-07 22:27 
GeneralRe: Hello world... please help Pin
Nelek13-May-07 20:46
protectorNelek13-May-07 20:46 
GeneralRe: Hello world... please help Pin
David Crow14-May-07 3:27
David Crow14-May-07 3:27 
QuestionHello world... help Pin
WakenDJ13-May-07 17:23
WakenDJ13-May-07 17:23 
AnswerRe: Hello world... help Pin
amets13-May-07 22:53
amets13-May-07 22:53 
QuestionThreadpool Linker Problem Pin
Cyrilix13-May-07 12:35
Cyrilix13-May-07 12:35 
AnswerRe: Threadpool Linker Problem Pin
led mike13-May-07 15:44
led mike13-May-07 15:44 
GeneralRe: Threadpool Linker Problem Pin
Cyrilix13-May-07 16:59
Cyrilix13-May-07 16:59 
QuestionProblem with print function ? Pin
Lewis0113-May-07 10:31
Lewis0113-May-07 10:31 
AnswerRe: Problem with print function ? Pin
bob1697213-May-07 10:57
bob1697213-May-07 10:57 
GeneralRe: Problem with print function ? Pin
Lewis0113-May-07 11:05
Lewis0113-May-07 11:05 
GeneralRe: Problem with print function ? Pin
bob1697213-May-07 11:27
bob1697213-May-07 11:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.