Search the board you can probably find a good source code too!
Type: Posts; User: beginner
Search the board you can probably find a good source code too!
The virtual functions should behave the way you wanted it to if your derived class, Circle in this situation inherits the base class that defines the virtual function behave().
thats all i know.. :(
>>nowadays asking the sex may be a good idea...
So, do you introuduce yourself first or ask somebody to introduce him/herself first...???
>> Enter you name:... Enter your.. bla bla...
or..
Hey...
How about introducing yourself first.. like a nice and polite robot...
and asking the user/stranger their info like you r doing a real conversation instead of being a regular commanding computer.....
Thanks a lot!! appreciat your help!!!
My first game was Treasure Hunt. I made it for my class project for embedded system. Used Multi-C. Made upto level 2.
SDL is a cross-platform and cross-language library so there's
no specific Win32 library, Just download the standard one.
The webpage doesn't say which is the standard one to download.
So am I...
Okay good fellows!
I just want to start the ABC of SDL with all your help... I've downloaded bunch of game programs that use SDL library. I would like to mess up with 'em so that I get the feeling...
OOP is just great... !!! This makes C++ "C++".
I just started learning OOP. It might be kinda hard and little frustrating (well thats what I felt!:) ) in the beginning but you'll find it charm... as...
Okay here's an working example assuming that the user inputs the data from the keyboard... the only thing you would have to do is read from the file in the similar way..:)
#include <iostream>...
#include <string>
#include <iostream>
int main(void)
{
string a;
string b;
int pos;
cout << "Enter string: ";
I didn't read the whole code thoroghly... but what i spotted at a glance is your copy constructor... It may not be the soultion you are expecting. What i know of is the parameter of the copy...
Thanks a lot sir!
I recreated the whole project actually and carefully selected the console app. It worked without any problem!
Thanks a lot agian!
The warning were just fine! wouldn't cause any problem for the program to run! but the two errors i keep getting!!!!!!
I posted the errors two posts above!!
Here it is again, for your convenience!...
Okay, I forgot that I could still compile... :D ...
here are the warnings i get:
main.cpp
C:\OOP\Project1\main.cpp(21) : warning C4786:...
Thanks a lot silentStrike for your great explanation. That helped me to understand!
I would post the warining, if i got to that point now :(.
First time it worked fine. So I tried to do the whole...
thanks a lot silentStrike!!
It worked just fine. still gives some long warnings... but executes fine!
std::string name;
bool operator < (const Cat& other) const;
};
this part you added...
Greetings everybody!
I searched the board and the google... but couldn't find any help.
So, I hope somebody here does surely have the answer!
I just started with OOP. The following program works...
Most teachers are old-fashoined!:) They prob. do say the difference in using int main and void main but the newbies just get the habbit with void main(for the easy sake!, i guess).
To add little more on what nvoigt said...
you don't have to write "using namespace std;" if you have used <library.h> (notice the ".h">, but i think the standard way (and the easier too) is to write...
MSVS C++ generally. gcc for my class esp. to compile C codes.
Planning to switch to .NET soon. :)
I hurriedly answered your question just to help you get started(also din't have much time before the class...:)
The swap function I wrote before works only for C++. In C everything is pass by...
A part of the solution
You can write a separte swap function:
void swap(int &a, int &b)
{
int temp = a;
a = b;
Eibro's codes compiled and executed fine with my compiler. I'm using Visual Studio 6. :) Can you write what it does for you, if its not working?
Try www.cplusplus.com to start out with...
I started with C++. Though I still suck in C++, I can write some small programs in C :). I felt C++ more flexible and easier than C.
Good luck!