File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes C / C++ and the fly likes c++ code not compiling in online compiler? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "c++ code not compiling in online compiler?" Watch "c++ code not compiling in online compiler?" New topic
Author

c++ code not compiling in online compiler?

thejwal pavithran
Ranch Hand

Joined: Feb 11, 2012
Posts: 117
hey guys when i try to run this program, i get the correct output in c free compiler..but when i try to run it onlinein ideone, i get a run time error..please help me guys...



on job hunt
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Please supply more details, including the name of the online compiler, in cased we need to avoid it
thejwal pavithran
Ranch Hand

Joined: Feb 11, 2012
Posts: 117
the problem was with using iostream.h where just iostream was needed also i had to use the statement using namespace std...

but now its giving a run time error...some non-standard memory allocation or something like that...the headaches of c++!! i would have implemented the same thing in java..but im still doing simple exercises by taking inputs through command line...im yet to learn how i can take inputs during run time....
by the way the name of the compiler is ideone.com..avoid unless you are using java
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
I have come across other online IDEs and have known them make errors in Java coding before.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
I could get that IDE to work for FORTH, however. That’s better than I have seen before
thejwal pavithran
Ranch Hand

Joined: Feb 11, 2012
Posts: 117
learning java paid off...i dont know if this code below is badly structured or has bad coding practices, but with the little knowledge i had,i was able to achieve the same thing in java..and the online compiler gave up and compiled..

Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 865
    
    5
This code portion is very suspicious. Where does word point to? How much memory is allocated to that "buffer"?
Where does gets(word) store the line?

 
jQuery in Action, 2nd edition
 
subject: c++ code not compiling in online compiler?
 
Similar Threads
answer for the program
substring, strings, and =='s
this program can read your mind..please rate my program dear guys.
Conversion help plz!!!
need help with C++ problem