You are not logged in.

#1 2013-07-04 14:23:05

mcool4151
Member
Registered: 2013-05-09
Posts: 37

[SOLVED]GCC problem

Hello everyone,
      I am a budding programmer and I am aware of the power of Linux and GCC but I think there is some thing wrong with GCC sometimes scanf() and fflush(stdin) statements dont work properly or they are not executed at all please suggest me some solution or else I have to shift from Arch Linux to FreeBSD which I dont really want please tell me a solution.........

Last edited by mcool4151 (2013-07-14 08:51:37)

Offline

#2 2013-07-04 14:39:14

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED]GCC problem

It's hard to give any suggestions without examples of code you think is misbehaving

Offline

#3 2013-07-04 21:05:43

SneakySnake
Member
Registered: 2012-03-30
Posts: 21

Re: [SOLVED]GCC problem

Using fflush(stdin) is not a good idea.

See http://stackoverflow.com/questions/2979 … flushstdin

Offline

#4 2013-07-14 08:51:19

mcool4151
Member
Registered: 2013-05-09
Posts: 37

Re: [SOLVED]GCC problem

Sorry actually I was doing some thing wrong..... I got my mistake.....

Offline

Board footer

Powered by FluxBB