compile error

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
opportunity
New poster
Posts: 9
Joined: Thu Sep 15, 2005 11:35 pm
Location: dhaka

compile error

Post by opportunity »

i've got compile error. but i cannot detect what the error is can anybody help me with this? thanx in advance.

// codes removed
Last edited by opportunity on Sun Feb 26, 2006 10:46 pm, edited 1 time in total.
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

You should include <cstdio> if you're using scanf and fgets. Anyway, it's bad style to mix those with iostreams. You should also use code tag instead of pasting code directly.
For millions of years, mankind lived just like the animals. Then something happened which unleashed the power of our imagination. We learned to talk and we learned to listen...
opportunity
New poster
Posts: 9
Joined: Thu Sep 15, 2005 11:35 pm
Location: dhaka

thanks

Post by opportunity »

hi,
thank u once again. this was really a silly mistake. i also tried not to use fgets but i could not input string with whitespaces. how can i do that if i want to use cin>> to read string from keyboard?
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post by Krzysztof Duleba »

You can use getline(cin, aString). Unfortunately, cin/cout are really slow in older versions of g++ and you can exceed time limit on many problems just by using them.
For millions of years, mankind lived just like the animals. Then something happened which unleashed the power of our imagination. We learned to talk and we learned to listen...
tmdrbs6584
Learning poster
Posts: 98
Joined: Sat Jan 21, 2006 12:45 pm
Location: Busan,Corea(Republic of)

1

Post by tmdrbs6584 »

:roll: :wink: :P :oops: :cry: :evil: :o :-? 8) :lol: :x :) :( Hi logic
Bye logic :D
tmdrbs6584
Learning poster
Posts: 98
Joined: Sat Jan 21, 2006 12:45 pm
Location: Busan,Corea(Republic of)

3124112345223564575376467453gsdfhjykliyncvbsfdgwreyw

Post by tmdrbs6584 »

Hi logic
Bye logic
sds1100
Learning poster
Posts: 95
Joined: Sat Dec 10, 2005 2:09 pm

kind Krzysztof Duleba

Post by sds1100 »

kind Krzysztof Duleba
Post Reply

Return to “C++”