Click here to Skip to main content
15,917,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to tile multiple windows in a single view Pin
ShanghaiDan11-Sep-10 9:57
ShanghaiDan11-Sep-10 9:57 
AnswerRe: How to tile multiple windows in a single view Pin
«_Superman_»12-Sep-10 18:50
professional«_Superman_»12-Sep-10 18:50 
GeneralRe: How to tile multiple windows in a single view - SOLVED Pin
Vaclav_13-Sep-10 2:39
Vaclav_13-Sep-10 2:39 
QuestionReference to a pointer question Pin
VentsyV10-Sep-10 11:43
VentsyV10-Sep-10 11:43 
AnswerRe: Reference to a pointer question Pin
MicroVirus10-Sep-10 12:53
MicroVirus10-Sep-10 12:53 
AnswerRe: Reference to a pointer question Pin
Niklas L10-Sep-10 21:04
Niklas L10-Sep-10 21:04 
AnswerRe: Reference to a pointer question Pin
Paul Michalik11-Sep-10 23:17
Paul Michalik11-Sep-10 23:17 
AnswerRe: Reference to a pointer question [modified] Pin
Aescleal12-Sep-10 11:01
Aescleal12-Sep-10 11:01 
Whevever someone says "How do I cast..." and "access violation" in the same sentence you know that something's going horribly wrong with their understanding of C++. In your case you aren't telling us the whole story as most of the code you presented wouldn't compile.

When you wrote:

myObjPtr & GetObjPtr();


You weren't writing a function prototype, you were bitwise anding the variable myObjPtr with the result of the function GetObjPtr and discarding the result. If you declared this in a function it would have compiled to nothing, outside of a function it wouldn't compile.

The same sort of thing's happening when you write:

myObjPtr& pTest = GetObjPtr();


You're not writing a declaration but you're trying to assign the result of a function called GetObjPtr (which you didn't declare, see earlier) to the result of bitwise anding myObjPtr with another variable you haven't declared (which is an rvalue) which won't compile.

Just out of interest:

class Object
{
}
myObj, *myObjPtr;


is generally a bit daft as of you stick this in an include file and then include the file in multiple Cpp/Cxx files you'll get loads of multiple copies of myObj and myObjPtr which is probably not what you want - it won't link for a start.

So if I were you I'd scrap this lot, work out what you want to say and then try again saying it in the language.

Cheers,

Ash

modified on Monday, September 13, 2010 6:51 AM

QuestionWindow IME language Pin
fusion_nuke@hotmail.com10-Sep-10 7:48
fusion_nuke@hotmail.com10-Sep-10 7:48 
GeneralRe: Window IME language Pin
David Crow10-Sep-10 8:15
David Crow10-Sep-10 8:15 
GeneralRe: Window IME language Pin
Nemanja Trifunovic10-Sep-10 8:48
Nemanja Trifunovic10-Sep-10 8:48 
GeneralRe: Window IME language Pin
David Crow10-Sep-10 9:30
David Crow10-Sep-10 9:30 
GeneralRe: Window IME language Pin
fusion_nuke@hotmail.com10-Sep-10 18:00
fusion_nuke@hotmail.com10-Sep-10 18:00 
AnswerRe: Window IME language Pin
Nemanja Trifunovic10-Sep-10 8:57
Nemanja Trifunovic10-Sep-10 8:57 
QuestionCList with Pointers Pin
VentsyV10-Sep-10 7:05
VentsyV10-Sep-10 7:05 
QuestionRe: CList with Pointers Pin
CPallini10-Sep-10 7:51
mveCPallini10-Sep-10 7:51 
AnswerRe: CList with Pointers Pin
VentsyV10-Sep-10 8:01
VentsyV10-Sep-10 8:01 
QuestionRe: CList with Pointers Pin
David Crow10-Sep-10 8:10
David Crow10-Sep-10 8:10 
AnswerRe: CList with Pointers Pin
VentsyV10-Sep-10 8:33
VentsyV10-Sep-10 8:33 
AnswerRe: CList with Pointers Pin
VentsyV10-Sep-10 9:18
VentsyV10-Sep-10 9:18 
QuestionPrint a FormView Pin
Shivanand Gupta10-Sep-10 2:25
Shivanand Gupta10-Sep-10 2:25 
AnswerRe: Print a FormView Pin
Richard MacCutchan10-Sep-10 5:21
mveRichard MacCutchan10-Sep-10 5:21 
AnswerRe: Print a FormView Pin
bob1697210-Sep-10 8:30
bob1697210-Sep-10 8:30 
GeneralRe: Print a FormView Pin
Shivanand Gupta11-Sep-10 8:31
Shivanand Gupta11-Sep-10 8:31 
GeneralRe: Print a FormView Pin
bob1697214-Sep-10 3:23
bob1697214-Sep-10 3:23 

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.