int *temp;
temp=new node;
and
temp = new node;
//is it necessary on this last declaration to do this int *temp?
int *temp;
temp=new node;
and
temp = new node;
//is it necessary on this last declaration to do this int *temp?
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
Well, what does your compiler say?
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
nah I haven't compiled it yet, I was just reading a tutorial and it did this temp = new node; and it claimed that temp was a pointer but I didn't see the pointer being declared anywhere, I was just asking because I am just learning and I might be wrong.
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
for a new Node you will never need an int* pointer.
correctly it should be....
Node* Temp=new Node;
or
Node* Temp;
Temp=new Node;
remember the object being pointed to is a Node so the pointer should be a pointer to a Node (Node*)
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi