View Single Post
Old 04-12-2007, 06:43 AM   #12 (permalink)
naruto1327
Dante’s Inferno
 
naruto1327's Avatar
 
Join Date: May 2006
Location: OLD PROFILE. NEW: NOODLEPOWA
Posts: 609
naruto1327 is on a distinguished road
Send a message via AIM to naruto1327 Send a message via MSN to naruto1327 Send a message via Yahoo to naruto1327
Default

Quote:
Originally Posted by raitodn View Post
agree c++ is better, c++ is Object-oriented programming. What make things a lots easier . Imo Inheritance, Encapsulation, Abstraction, Polymorphism are very important if you want to have a good arranged programm, I dont know if those things are necessary for writing a game.

well in my opinion java is better at those things then c++.
Object Oriented Programming is a style of programming, and C++ is not a style. However, you can use OOP with C++. The other things you've mentioned are important but not required for a program.

Example:
Code:
#include <iostream>
using namespace std;
int main()
{
int mainNum = 0;
int userInput;
cout << "Please enter an positive integer to continue, anything else to quit.\n";
while (cin >> userInput && userInput > 0)
{
mainNum += userInput;
cout << mainNum;
}
return 0;
}
naruto1327 is offline   Reply With Quote