Will civ 5 use c++

Well, if you know any programming language learning a new one isnt that hard. Start with C++ if you must, but it weould be better to start with C (i bet they start with C if its a basic class)

Honestly, given that C++ is just C with object oriented stuff, if this is a high school class, I doublt they'll get to anything (except possibly vectors and mayble even classes later on) where there will be a difference.
 
XML isn't actually a programming language, it's "markup" in that you just put tags around data to say what it is.

C++ is a programming language. You're writing commands to tell the computer what you want it to do, in terms the computer understands. Here's a very simple example:

int x = 2;
int y = 5;
int z = x + y;
printf("2 + 5 is %d", z);


That will print out "2 + 5 is 7". Obviously programs of any real complexity get MUCH bigger and more complicated, and C++ is not one of the easiest languages out there to learn. But that's part of what makes it a good course to take. If you know it, you can learn almost anything else.

Ewww "printf". :p
 
So is it possible to change to game code to add in elements of strength - defense - and firepower in combat? Will that be modding in C++?
 
So is it possible to change to game code to add in elements of strength - defense - and firepower in combat? Will that be modding in C++?
If I recall correctly, that's what Fall from Heaven had to do. Still, I could be wrong, but it wasn't something you could do in XML, and that means you had to do it in either python or the SDK. And pretty much, anything you can do in python you can do in the SDK.
 
Also, I just wanted to add, modifying a SDK is probably 50 times easier than writing the same block of code from scratch. As long as you know basic programming, you can edit C++.
 
You'd better learn C++ before modifying C++ code, though. Because if you mess with java, lua, python, you'll get an exception, but if you call a C/C++ function that's outputting stuff directly to the graphics card and you feed it invalid data, you may end up with a blue screen of death. So better learn first. Forgetting a [] after a delete can have dire consequences.
 
Well, you won't be feeding the graphics card anything, because that will almost certainly be handled in the exe. The worst you can do editing the SDK is crash civ. All the dangerous stuff is in the exe and won't be moddable.
Yeah, usually, you have to be actively malicious to crash the whole system with a modified Civ - most modern operating systems are also pretty good at handling access violations. Most of the time, though, errors will rather prevent the code from compiling in the first place... (though these are massively easier to fix than runtime errors).

Cheers, LT.
 
Yeah I took C++ in high school then took AP comp sci that was in Java and now back to C++ in college. More or less at least I learned some about pointers in C++ by the end of the class in HS but we were just getting into the ++ parts. But I never learned any C separate then C++. So If you have a c++ class you will earn the c parts as well you don't need to take a separate c class as well.
 
If you want to learn to code, start with C.
 
If you want to learn to code, start with C.
Been there, done that... in hindsight, starting out with C++, while leaving the OO stuff out for the start is - as far as I can tell - better. Because "new" and "delete" are so, so much better than bothering with "malloc"... :cringe:

Cheers, LT.
 
You'd better learn C++ before modifying C++ code, though. Because if you mess with java, lua, python, you'll get an exception, but if you call a C/C++ function that's outputting stuff directly to the graphics card and you feed it invalid data, you may end up with a blue screen of death. So better learn first. Forgetting a [] after a delete can have dire consequences.

WAIT! Are you saying that I could mess up my computer if I make a mistake in c++?
 
WAIT! Are you saying that I could mess up my computer if I make a mistake in c++?

It'd be very hard. :) When you write a program, it's protected against using stuff it shouldn't by the operating system, and it's pretty hard to mess up in a system-crashing manner. While I won't say it can't happen, I'd say it'd be very, very rare, and it'd be fixed by a restart. Nothing permanent. (Unless you're specifically trying to do something permanent)

I also back the suggestion to learn C or C++ extremely, over any other language. Other languages teach you bad habits and hide things from you; C is pretty transparent, and gives you a much better feel for how the computer work with memory.
 
C and C++ is the workhorse language of applications pretty much. If Civ V doesn't let you use it no worries, it is still very very useful elsewhere.
 
Yes, you could mess up your computer.

It is exceedingly unlikely, especially as you aren't going to be directly fiddling with the 3d graphics subsystem (which tends to have lower level access than most other things you are doing). And even there, if you mess things up, it will be a computer crash.

Programs generally crash before they mess up the system, because modern OSs set the equivalent of "traps" for programs that are flailing about. If you go and dereference random memory, your program is halted.

When you screw up in C++, it is like you take a random instruction from a big bag. But 999,999,999,999,999,999,999 of the instructions in the bag are "your program crashes", and 1 of them is "make your computer beep" or something worse.

So in practice, what happens when you screw up is your program crashes.
 
Top Bottom