Click here to Skip to main content
15,355,133 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUser privileges stopping a program from rename(,)'ing files Pin
Anthony Appleyard20-Jan-13 18:51
MemberAnthony Appleyard20-Jan-13 18:51 
AnswerRe: User privileges stopping a program from rename(,)'ing files Pin
Super Lloyd20-Jan-13 19:52
MemberSuper Lloyd20-Jan-13 19:52 
GeneralBUG FOUND Pin
Anthony Appleyard21-Jan-13 0:03
MemberAnthony Appleyard21-Jan-13 0:03 
GeneralRe: BUG FOUND Pin
Super Lloyd21-Jan-13 0:57
MemberSuper Lloyd21-Jan-13 0:57 
QuestionA pointer reference as l-value Pin
George Nistor20-Jan-13 2:07
MemberGeorge Nistor20-Jan-13 2:07 
AnswerRe: A pointer reference as l-value Pin
Maximilien20-Jan-13 3:18
MemberMaximilien20-Jan-13 3:18 
AnswerRe: A pointer reference as l-value Pin
Richard MacCutchan20-Jan-13 3:56
mveRichard MacCutchan20-Jan-13 3:56 
GeneralRe: A pointer reference as l-value Pin
George Nistor20-Jan-13 4:02
MemberGeorge Nistor20-Jan-13 4:02 
Yes, of course.
Still, I am interested to know why the code does not work with both cases, or why only in the second case;

C++
void setLeft(Node* l) { left = l; };


Also notice if I do, it works:
C++
Node *r=    p->Left();
r= new Node(); //error : error C2106: '=' : left operand must be l-value


Maybe because in the second case it references directly a l-value by reference
and in the second it uses a copy to a pointer?
GeneralRe: A pointer reference as l-value Pin
Richard MacCutchan20-Jan-13 4:11
mveRichard MacCutchan20-Jan-13 4:11 
GeneralRe: A pointer reference as l-value Pin
Freak3021-Jan-13 4:43
MemberFreak3021-Jan-13 4:43 
GeneralRe: A pointer reference as l-value Pin
George Nistor21-Jan-13 5:37
MemberGeorge Nistor21-Jan-13 5:37 
GeneralRe: A pointer reference as l-value Pin
Freak3021-Jan-13 22:08
MemberFreak3021-Jan-13 22:08 
QuestionThe 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 1:12
MemberAnthony Appleyard20-Jan-13 1:12 
AnswerRe: The 'rename' function gives errno == -1 Pin
pasztorpisti20-Jan-13 1:26
Memberpasztorpisti20-Jan-13 1:26 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 3:01
MemberAnthony Appleyard20-Jan-13 3:01 
AnswerRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 3:50
mveRichard MacCutchan20-Jan-13 3:50 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 4:32
MemberAnthony Appleyard20-Jan-13 4:32 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 4:37
mveRichard MacCutchan20-Jan-13 4:37 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 5:02
MemberAnthony Appleyard20-Jan-13 5:02 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 5:04
mveRichard MacCutchan20-Jan-13 5:04 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 5:11
MemberAnthony Appleyard20-Jan-13 5:11 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 5:33
mveRichard MacCutchan20-Jan-13 5:33 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 5:57
MemberAnthony Appleyard20-Jan-13 5:57 
GeneralRe: The 'rename' function gives errno == -1 Pin
Richard MacCutchan20-Jan-13 6:20
mveRichard MacCutchan20-Jan-13 6:20 
GeneralRe: The 'rename' function gives errno == -1 Pin
Anthony Appleyard20-Jan-13 11:03
MemberAnthony Appleyard20-Jan-13 11:03 

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.