Well,
Code:
#include <iostream>
using namespace std;
void main() {
int a = 3;
int &b = a;
cout<<b<<endl;
system("PAUSE");
} works fine (reference - This is not a pointer):
Code:
3
Tryck ned valfri tangent för att fortsätta...
Code:
...
int *b = &a;
cout<<b<<endl;
...
gets the address, is that what you want?
Code:
0043FA74
Tryck ned valfri tangent för att fortsätta...
Code:
...
int *b = &a;
cout<<*b<<endl;
...
works fine (pointer):
Code:
3
Tryck ned valfri tangent för att fortsätta...
I'm really not sure what you're trying to acheive.
Bookmarks