Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 need help...
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ownageprince




PostPosted: Mon Oct 30, 2006 10:27 pm   Post subject: need help...

hey..i was in the dwite.org contest thingy and i solved two problems but when they were sent to them it said that the programs were not executed but they worked perfectly fine on my friends and my laptops..
can some1 pls tell why they did not execute if there is a problem with them..



Data11.txt
 Description:
data file..

Download
 Filename:  Data11.txt
 Filesize:  64 Bytes
 Downloaded:  312 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
ownageprince




PostPosted: Mon Oct 30, 2006 10:28 pm   Post subject: contd

oops this is the source code...


P1.cpp
 Description:
problem 1

Download
 Filename:  P1.cpp
 Filesize:  2.87 KB
 Downloaded:  248 Time(s)

Tony




PostPosted: Mon Oct 30, 2006 10:37 pm   Post subject: (No subject)

here's what I get with gcc / g++
Quote:

P1.cpp: In function `int main()':
P1.cpp:5: error: `nocreate' is not a member of type `std::basic_ios<char,
std::char_traits<char> >'


your second submission has the same problem
Quote:

P2.cpp: In function `int main()':
P2.cpp:6: error: `nocreate' is not a member of type `std::basic_ios<char,
std::char_traits<char> >'
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
wtd




PostPosted: Mon Oct 30, 2006 11:07 pm   Post subject: (No subject)

The "iostream.h" and "fstream.h" headers are deprecated.
ownageprince




PostPosted: Tue Oct 31, 2006 11:32 pm   Post subject: (No subject)

whoa..could you guys explain a little more pls? i want to get points next time..
ownageprince




PostPosted: Tue Oct 31, 2006 11:39 pm   Post subject: (No subject)

hang on would that happen because of differences between the compiler that i use and they use? cuz i use the program microsoft visual c++ and i they use gnu complier
wtd




PostPosted: Wed Nov 01, 2006 9:47 am   Post subject: (No subject)

http://www.devx.com/tips/Tip/14544
Tony




PostPosted: Wed Nov 01, 2006 10:48 am   Post subject: (No subject)

ownageprince wrote:
hang on would that happen because of differences between the compiler that i use and they use?

probably not in this case, for the reasons wtd points out.

Although I would strongly recommend having a copy of the judge's compiler. You are welcome to develop and test with your tools of choice, but it would be good practice to run a quick test with the official compiler to avoid some quirks that might result. It would be a silly reason to loose points otherwise.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Wed Nov 01, 2006 10:58 am   Post subject: (No subject)

It is a difference in the compiler. VC++ (especially version 6) includes support for non-standard headers like "iostream.h".

GCC supports standard C++. The OP did not write standard C++, so GCC crapped on his code.
ownageprince




PostPosted: Wed Nov 01, 2006 9:12 pm   Post subject: (No subject)

oohh i understand now...thank you very guys ^^
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: