Hello
I have a problem. The following program throws a "0" instead of a "25". I´m from the JAVA world, and in JAVA the output is "25"
Hope, anybody can help me
Thanks ..
class Content
public
Content()
wert = 0
Content::~Conte nt()
int getValue()
return value
void setValue(int _value)
value= _value
private
int value
}
--
#include "Content.h
class Container
public
Container()
Container::~Con tainer()
Content getContent()
return content
void setContent(Cont ent _content)
content = _content
private
Content content
}
--
// Allocationprobl em.cp
/
#include "stdafx.h
#include <iostream.h
#include "Container. h
int main(int argc, char* argv[])
Container container = Container()
container.getCo ntent().setValu e(25)
cout << container.getCo ntent().getValu e() << endl
return 0
I have a problem. The following program throws a "0" instead of a "25". I´m from the JAVA world, and in JAVA the output is "25"
Hope, anybody can help me
Thanks ..
class Content
public
Content()
wert = 0
Content::~Conte nt()
int getValue()
return value
void setValue(int _value)
value= _value
private
int value
}
--
#include "Content.h
class Container
public
Container()
Container::~Con tainer()
Content getContent()
return content
void setContent(Cont ent _content)
content = _content
private
Content content
}
--
// Allocationprobl em.cp
/
#include "stdafx.h
#include <iostream.h
#include "Container. h
int main(int argc, char* argv[])
Container container = Container()
container.getCo ntent().setValu e(25)
cout << container.getCo ntent().getValu e() << endl
return 0
Comment