pointer to structure
I have two questions about the program that is at the bottom of the post:
First, if I write a program Code:
int* ip=&i; Code:
cout<<ip; Code:
structure3* sp1=&s1; Code:
#include<iostream> |
Re: pointer to structure
Quote:
int * a = new int; cout << a << endl; // put the address of a (int*) char * s = "i'm a string"; cout << s << endl; // put a string, not the address of s; So if U want to get the address, U need to write cout << (int*)(&s1.c) << endl; |
Thank you.
I feel I can understand some parts of your post, and I can't understand others because of my poor c++ knowledge. Howeve, I have downloaded it for future learning. Thank you. |
All times are GMT -5. The time now is 08:38 AM. |