C++ Coding

Avatar
sssummer
69 Posts
Posted Mar 16, 2008
Does anyone here use C++ or other programs to code? I just started.. it's pretty confusing. Just curious if I was the only one. >.>
Advertisement
Registered users don't see ads! Register now!
Avatar
Interitus
145 Posts
Posted Mar 16, 2008
Replied 41 minutes later
I've tried the tutorial books up till the chapter on pointers, gotten confused as hell, and given up. I would like to learn c++ tho. I dont think it'll ever happen tho
Avatar
sssummer
69 Posts
Posted Mar 16, 2008
Replied 47 minutes later
Lol, I finally made a basic program with it.. however I don't know how the hell to make a setup file so other people can use it. If you just send the exe it doesn't work..
Avatar
Hober
1,180 Posts
Posted Mar 16, 2008
Replied 26 minutes later
Ideally, you shouldn't need a setup file to make a simple program run. Most setup programs are just unpacking all the files in a program and putting them in the right place. If it's just a simple program, and just one file, shouldn't need that.

As for it not working on another computer, is it the same type of computer in terms of operating system and architecture? When you make an .exe out of a C++ file, you compile it specifically for the computer it's being run on. This is why other languages like Java have gained the foothold they have for their cross-platform compatibility; they aren't compiled per platform.

Avatar
infernet89
174 Posts
Posted Mar 16, 2008
Replied 2 hours later
When you make a .exe for windows, every pc whith windows can run it, usually.

Probably you forgotten the
system("pause");
at the end of the program, so the window close more faster than you can read.

Avatar
Aldéz
221 Posts
Posted Mar 16, 2008
Replied 3 hours later
Which program are you compiling with? In Visual Studio, you need to compile the program as a "Release" to make it work on other computers. This is how I do it in the Professional edition, don't know if it works in the Express (free) version:

In the menu click Build > Configuration Manager
Change active solution configuration to "Release".
Then Build > Build Solution

Avatar
youme
937 Posts
Posted Mar 16, 2008
Replied 46 minutes later
I've done a little bit of blitz basic (the language the very very original worms was written in) but that was many years ago.
Then when I started doing flash animations I started making games in actionscript 2.0 a horrible jumble of other languages.
I took one look at the C variant languages and ran like a screaming baby. Then when dad showed my the big book of "all the features of C you must not use for saftey equipment" and I ran even further. I'll stick to mapping for now
Avatar
Hober
1,180 Posts
Posted Mar 16, 2008
Replied 8 hours later

youme wrote:
Then when dad showed my the big book of "all the features of C you must not use for saftey equipment" and I ran even further.

System: So, uh, where do you want to put that into memory?
Java: How about operating system memory?
System: Yeeeeah... about that... Not happening. How about you, C++?
C++: Hmm. In that case, how about operating system memory?
System: Sure. Which part?
C++: I dunno, whichever part is closest to the inside of the cylinder.
System: Oh, the boot sector, where the partition table is stored?
C++: Sounds good.
System: Sweet! This is gonna be awesome!

Avatar
bizob
186 Posts
Posted Mar 16, 2008
Replied 3 hours later

Hober wrote:
System: So, uh, where do you want to put that into memory?
Java: How about operating system memory?
System: Yeeeeah... about that... Not happening. How about you, C++?
C++: Hmm. In that case, how about operating system memory?
System: Sure. Which part?
C++: I dunno, whichever part is closest to the inside of the cylinder.
System: Oh, the boot sector, where the partition table is stored?
C++: Sounds good.
System: Sweet! This is gonna be awesome!

ROFL!!!

I've done some java stuff as well as a good bit of VB. I liked java for its portability and is a pretty powerful language, but VB is super easy to learn and IDEs make putting together apps fast. I've seen some C++ code and it didn't seem that intimidating.

Avatar
sssummer
69 Posts
Posted Mar 18, 2008
Replied 1 day later

Ald?z wrote:
Which program are you compiling with? In Visual Studio, you need to compile the program as a "Release" to make it work on other computers. This is how I do it in the Professional edition, don't know if it works in the Express (free) version:

In the menu click Build > Configuration Manager
Change active solution configuration to "Release".
Then Build > Build Solution

I did this but does it still doesn't work, I sent it to my friend to test it but he got this error.

This Application has failed to start because the application confriguration is incorrect

halp pulez.

Avatar
sssummer
69 Posts
Posted Mar 18, 2008
Replied 4 minutes later

infernet89 wrote:
When you make a .exe for windows, every pc whith windows can run it, usually.

Probably you forgotten the
system("pause");
at the end of the program, so the window close more faster than you can read.

And I did this already, thats not the issue, they get an error.

This Application has failed to start because the application confriguration is incorrect
Avatar
brookesi
1 Posts
Posted Mar 26, 2008
Replied 7 days later
Hi,

I have just joined TWP and am starting my first map for Portal.

I am a programmer however. The issue you are seeing is I think due to missing or incorrect versions of some of the windows dynamically loaded libraries (DLLs).

Might be worth taking a look at this link:

http://forums.microsoft.com/MSDN/ShowPo ... 5SiteID=1

It may depend on whether you are Vista/XP, but particularly there are core libraries called 'runtime libraries' which may need to be deployed with your program...certainly this may be the case if Visual Studio pulls in things like .NET libraries...

Regards,
Simon

&&

Advertisement
Registered users don't see ads! Register now!
Avatar
Hober
1,180 Posts
Posted Mar 26, 2008
Replied 1 hour later
@brookesi: :thumpup:

Way to start off with a bang. Welcome to TWP.