
Originally Posted by
Fairy-Killer
Bjarne Stroustup is actually one the heads of our department so C++ is shoved down our throats (rightfully) here. But yeah, don't try to go into a gaming industry without C/C++. C will make you manage your memory more so I'd suggest C++ first and going back to C unless you think you can handle every bit of memory. And Senoska, that's great that you use C# for your career, but the guy wants to break into the gaming industry. Saying C++ is crap kinda... lol. He might end up doing something else with his career, and even then C++ would be better than C#. I think I saw 2-3 jobs that required C# out of the 30+ I applied for a couple weeks ago, while all of them required C++. I looked at interning at a gaming company, but they require so much more than just any other job and I don't have the free time to dedicate to developing a video game.
I'll accept that point if that is his for-sure end goal. Although, learning Javascript right now would allude to other things. I was simply plugging it for its ease of use and the fact XNA is built on it which makes a simple transition.
Code:
#include <iostream>
using std::cout;
using std::endl;
#include <string>
using std::string;
int main()
{
string string1( "abc edfgh ijk lmno pqr stu vw xyz" );
cout << "Original string:\n" << string1 << endl << endl;
int position = string1.find( "." ); // find first period
while ( position != string::npos )
{
string1.replace( position, 2, "12345;;123", 5, 2 );
position = string1.find( ".", position + 1 );
}
cout << string1 << endl;
return 0;
}
vs
Code:
String blah = "blahblahblah";
String replaced = blah.Replace('h', 'n');
For a beginner learning concepts, which of this is going to be easier to learn?