Click here to Skip to main content
15,907,233 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Baisc Pointer Question Pin
Maximilien10-Dec-04 6:40
Maximilien10-Dec-04 6:40 
GeneralRe: Baisc Pointer Question Pin
Anonymous10-Dec-04 6:51
Anonymous10-Dec-04 6:51 
GeneralRe: Baisc Pointer Question Pin
John M. Drescher10-Dec-04 9:56
John M. Drescher10-Dec-04 9:56 
GeneralRe: Baisc Pointer Question Pin
moredip10-Dec-04 7:06
moredip10-Dec-04 7:06 
GeneralRe: Baisc Pointer Question Pin
Maximilien10-Dec-04 7:33
Maximilien10-Dec-04 7:33 
GeneralRe: Baisc Pointer Question Pin
Anonymous10-Dec-04 8:06
Anonymous10-Dec-04 8:06 
GeneralRe: Baisc Pointer Question Pin
moredip10-Dec-04 8:25
moredip10-Dec-04 8:25 
GeneralRe: Baisc Pointer Question Pin
Maximilien10-Dec-04 9:01
Maximilien10-Dec-04 9:01 
The stuff I am doing is a little bit more complex. I want to point b's link list data to a's link list's data and then remove the la ink list(without destroying the data)

you can't really do that, at least the way I think you want to do it.

if your data ( a or b ) are not dynamically allocated ( new or malloc ) , then, you will need to copy the data; and passing a reference a to b and then removing a will invalidate b ( at best ).

in your example, ReturnA copies the data.

but for example, if your CFirst looks like :

class CFirst {
int* a; // will be allocated and assigned.
int* ReturnA( return a;};
}

then, you return the address of a to whoever receives it;

int* b = ReturnA();

but you will need to keep track of allocation and deallocation.



Maximilien Lincourt
Your Head A Splode - Strong Bad
GeneralRe: Baisc Pointer Question Pin
poiut10-Dec-04 9:29
poiut10-Dec-04 9:29 
GeneralRe: Baisc Pointer Question Pin
Antti Keskinen10-Dec-04 10:52
Antti Keskinen10-Dec-04 10:52 
GeneralRe: Baisc Pointer Question Pin
John R. Shaw10-Dec-04 20:02
John R. Shaw10-Dec-04 20:02 
Questioncan we create a rich colored icon for VC? Pin
includeh1010-Dec-04 6:17
includeh1010-Dec-04 6:17 
AnswerRe: can we create a rich colored icon for VC? Pin
G. Steudtel10-Dec-04 7:24
G. Steudtel10-Dec-04 7:24 
GeneralCustomized Common Dialog Pin
mayoung10-Dec-04 6:04
mayoung10-Dec-04 6:04 
GeneralRe: Customized Common Dialog Pin
Jim Crafton10-Dec-04 6:36
Jim Crafton10-Dec-04 6:36 
GeneralRe: Customized Common Dialog Pin
mayoung10-Dec-04 6:49
mayoung10-Dec-04 6:49 
GeneralRe: Customized Common Dialog Pin
bolivar12314-Dec-04 7:23
bolivar12314-Dec-04 7:23 
GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 5:11
mayoung16-Dec-04 5:11 
GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 6:11
mayoung16-Dec-04 6:11 
GeneralRe: Customized Common Dialog Pin
bolivar12316-Dec-04 9:25
bolivar12316-Dec-04 9:25 
GeneralRe: Customized Common Dialog Pin
mayoung16-Dec-04 10:54
mayoung16-Dec-04 10:54 
GeneralProblems with app icon and TaskManager Pin
Jim Crafton10-Dec-04 5:47
Jim Crafton10-Dec-04 5:47 
GeneralWarnings C4663, C4018, C4100 Pin
Robert Valentino10-Dec-04 5:03
Robert Valentino10-Dec-04 5:03 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Antti Keskinen10-Dec-04 5:42
Antti Keskinen10-Dec-04 5:42 
GeneralRe: Warnings C4663, C4018, C4100 Pin
Member 89747210-Dec-04 7:45
Member 89747210-Dec-04 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.