
-----------------------------------
ownageprince
Mon Oct 30, 2006 10:27 pm

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..

-----------------------------------
ownageprince
Mon Oct 30, 2006 10:28 pm

contd
-----------------------------------
oops this is the source code...

-----------------------------------
Tony
Mon Oct 30, 2006 10:37 pm


-----------------------------------
here's what I get with gcc / g++

P1.cpp: In function `int main()':
P1.cpp:5: error: `nocreate' is not a member of type `std::basic_ios'


your second submission has the same problem

P2.cpp: In function `int main()':
P2.cpp:6: error: `nocreate' is not a member of type `std::basic_ios'


-----------------------------------
wtd
Mon Oct 30, 2006 11:07 pm


-----------------------------------
The "iostream.h" and "fstream.h" headers are deprecated.

-----------------------------------
ownageprince
Tue Oct 31, 2006 11:32 pm


-----------------------------------
whoa..could you guys explain a little more pls? i want to get points next time..

-----------------------------------
ownageprince
Tue Oct 31, 2006 11:39 pm


-----------------------------------
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
Wed Nov 01, 2006 9:47 am


-----------------------------------
http://www.devx.com/tips/Tip/14544

-----------------------------------
Tony
Wed Nov 01, 2006 10:48 am


-----------------------------------
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.

-----------------------------------
wtd
Wed Nov 01, 2006 10:58 am


-----------------------------------
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
Wed Nov 01, 2006 9:12 pm


-----------------------------------
oohh i understand now...thank you very guys ^^
