Automap problems D:

Automap problems D:

kyle6513
2009 Dec 3 • 3
Hello there!
I was attempting to compile your automap source file superjer and I'm getting a fair few errors
I'm not too sure if I have my c++ editor installed properly ect, if you could help me into getting it to compile properly I would be forever grateful
I'm attempting to remake it for a mod, http://www.svencoop.com/
just means adding some new monsters, weapons and possibly textures. think of it as a, learning exercise for my c++ well, learning.

if anyone else could help me that would be great although this code isn't too well commented so yeah

Errors:
code
1776 gen_1_0.cpp `main' must return `int' gen_1_0.cpp In function `int main(...)': 2013 gen_1_0.cpp return-statement with no value, in function returning 'int' 2013 gen_1_0.cpp In copy constructor `std::basic_ios >::basic_ios(const std::basic_ios >&)': 738 ios_base.h `std::ios_base::ios_base(const std::ios_base&)' is private 3696 gen_1_0.cpp within this context 3696 gen_1_0.cpp In copy constructor `std::basic_filebuf >::basic_filebuf(const std::basic_filebuf >&)': 769 streambuf `std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits]' is private 3696 gen_1_0.cpp within this context In function `int main(...)': 3696 gen_1_0.cpp initializing argument 1 of `void write_kill_zone(std::ofstream)' 4355 gen_1_0.cpp return-statement with no value, in function returning 'int'
 
 
 
2009 Dec 3 at 00:54 PST
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
Not having looked at the code, I'd say there are a few errors that really depend on compiler strictness. Some will let you by with void main() for instance. But Proper Code will use an int, yes. As for the "function is private" errors... well... how much do you about OO programming?
 
 
 
2009 Dec 3 at 18:21 PST
kyle6513
2009 Dec 3 • 3
let me put it this way, I'm just starting out so I think its safe to say %$#& all :)
 
 
 
2009 Dec 4 at 09:02 PST
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
 
 
 
2009 Dec 4 at 09:29 PST
SuperJer
Websiteman

2005 Mar 20 • 6629
Oh dear not Automap again. Such shamefully bad code.

Well I went ahead and "modernized" it ever so slightly. I don't have Windows/Visual Studio anything here so I just got it to compile in GCC 4.3.3 on Linux. I'm assuming that means it will work OK on Windows/VS as well since there's nothing platformy or unusual in the code.

www.superjer.com/automap/files/gen_1_1.cpp
 
 
 
2009 Dec 4 at 16:53 PST — Ed. 2009 Dec 4 at 16:56 PST
SuperJer
Websiteman

2005 Mar 20 • 6629
Down Rodeo said:
As for the "function is private" errors... well... how much do you about OO programming?


Luckily that turned out not to be the real problem. The ios_base errors were just the result of passing around an ofstream object by-value.

Other than that all I did was add 0 to return; in a couple spots and <iostream>, <fstream>, using namespace std;
 
 
 
2009 Dec 4 at 16:59 PST
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
 
 
 
2009 Dec 5 at 04:26 PST
kyle6513
2009 Dec 3 • 3
legend superjer :D

edit: compiles now, editing time :D

edit...again: don't you hate it when Microsoft forces you to update a file and then it takes massive chunks out of it? looks like I'm going to have to find the version of visual basic that this frontend was made with >.<
 
 
 
2009 Dec 5 at 11:19 PST — Ed. 2009 Dec 5 at 12:06 PST
SuperJer
Websiteman

2005 Mar 20 • 6629
The frontend only works in VB6. You don't really need the frontend though. It would be easiest to either not use it at all or just make a new one in a more modern language.

All the real work is done in the C++ backend.
 
 
 
2009 Dec 7 at 02:46 PST
Page [1]