Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
c++oop basic
Print
Pages: [
1
]
Author
Topic: c++oop basic (Read 2076 times)
0 Members and 1 Guest are viewing this topic.
CreaM
Newbie
Posts: 36
c++oop basic
«
on:
May 22, 2014, 05:30:32 pm »
hello, how can i get data from one class to another, without using specific object?
-smthing like this:
class
bank
{
public
:
int
getMoney
(
)
{
return
money
;
}
private
:
int
money
;
}
class
thief
{
public
:
void
stole
(
)
{
int
money
;
money
=
bank.
getMoney
;
std
::
cout
<<
"thief stole"
<<
money
;
}
}
please write an example - im beginner
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: c++oop basic
«
Reply #1 on:
May 22, 2014, 05:32:12 pm »
This has nothing to do with SFML, you'll find better forums for such questions.
Please read
a good book about C++
, knowing the programming language is mandatory when you want to use libraries like SFML.
Edit: Now I saw we already told you that
here
. When you don't find it necessary to listen to our advice and read a good book, what do you expect?
«
Last Edit: May 22, 2014, 05:40:51 pm by Nexus
»
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
G.
Hero Member
Posts: 1593
Re: c++oop basic
«
Reply #2 on:
May 22, 2014, 05:46:58 pm »
The SFML C binding forum for a "C++ OOP" question? Nice thinking.
Logged
CreaM
Newbie
Posts: 36
Re: c++oop basic
«
Reply #3 on:
May 22, 2014, 06:08:06 pm »
i actually bought c++ book, but it's quite complicated and when i meet a problem i cant solve it using just book - its hard to find simple solution in 400 pages...
ps: i know this isnt much programing message, but... And sory for the mess in forums.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
c++oop basic
anything