AW: pointers
- From: "Daniel Kraft" <d daniel-kraft net>
- To: <gtkmm-list gnome org>
- Subject: AW: pointers
- Date: Sat, 14 Jan 2006 10:23:28 +0100
> here is such functions:
> std::list<double>* func1()
> {
> std::list<double> Out = new std::list<double>;
I think you mean
std::list<double>* Out(new std::list<double>());
>
> Out->push_back(0.0);
> ...
>
> return Out;
> }
>
> and main func.:
>
> ...
> std::list<double> z;
Again:
std::list<double>* z;
> z = func1();
> ...
>
> Is it right?
>
> error in memory address!! Why?
> Or i must :
> std::list<double> z = new ....?
Yours, Daniel Kraft
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]