Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,151,558 members, 7,812,790 topics. Date: Monday, 29 April 2024 at 07:23 PM |
Nairaland Forum / Science/Technology / Programming / C++ Compiling Error (785 Views)
Best App For Writing And Compiling Programs On Android Devices / Using AJAX For Server Side Compiling / Compiling From Source Codes (2) (3) (4)
C++ Compiling Error by cruworld(m): 9:28am On Apr 04, 2011 |
#include <iostream> Please why is it that after compiling the program, it display the result and exit without pressing the enter key. Same thing to other programs that return values. but printing strings dosen't do like that. |
Re: C++ Compiling Error by sweetpawn1: 12:18am On Apr 05, 2011 |
HALLO, WHAT EXACTLY DO YOU WANT TO DO? COUNT NUMBERS FROM 1 TO 10 OR CALCULATE THE AVERAGE? ITS KINDA DIFFICULT GIVING YOU THE REPLY COS AM A BIT CONFUSED ABOUT YOUR CODE! |
Re: C++ Compiling Error by segsalerty(m): 7:58am On Apr 05, 2011 |
use getch(); before your return 0; in ur main method, ok ? |
Re: C++ Compiling Error by kodewrita(m): 8:20am On Apr 05, 2011 |
#include <iostream> my guess is that when you run this program: The for loop will not work because a is 0 by default (its an integer and you have not initialised it with a value.) so it just falls through the fall loop. (a>0 is not true and hence the loop cant proceed.) as earlier said, you can use cin.get(); or simply cin>>p; Am tempted to write a program to do what you want but I guess this is a class assignment so I wont do that. get a textbook and take it one line at a time. its easy. |
Re: C++ Compiling Error by sweetpawn1: 9:14am On Apr 05, 2011 |
AH, WORKS LIKE A CHARM! THIS POST WAS LARGELY IGNORED UNTIL I CAME AND FEIGNED IGNORANCE ON ITS SOLUTION. IMMEDIATELY FOLKS RUSHED IN TO SHOW OFF THEIR REMARKABLE TALENTS. ITS EASY TO GET NIGERIANS TO DO WHAT YOU WANT THEM TO DO FOR YOU, ONCE YOU KNOW THEIR PATTERN! WELL, GOODLUCK TO THE OP. I GUESS NOW YOUR PROBLEM'S SOLVED! |
Re: C++ Compiling Error by segsalerty(m): 12:32am On Apr 06, 2011 |
sweet-pawn: whats that suppose to mean? i dnt grab ur concept |
Re: C++ Compiling Error by sweetpawn1: 7:30am On Apr 06, 2011 |
Ah, don't mind me! I was just thinking aloud! |
Re: C++ Compiling Error by segsalerty(m): 11:56pm On Apr 06, 2011 |
sweet-pawn: i see , |
(1) (Reply)
Why Is This Not Working For Me / Mcts / How Do I Retrieve Fields From The A Java Derby Database
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |