Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
Dave Harper8-Oct-03 9:07
Dave Harper8-Oct-03 9:07 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
Terry O'Nolley8-Oct-03 9:18
Terry O'Nolley8-Oct-03 9:18 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
ZoogieZork8-Oct-03 10:13
ZoogieZork8-Oct-03 10:13 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
Bo Hunter8-Oct-03 10:31
Bo Hunter8-Oct-03 10:31 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
Dave Harper8-Oct-03 11:36
Dave Harper8-Oct-03 11:36 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
ZoogieZork8-Oct-03 12:43
ZoogieZork8-Oct-03 12:43 
GeneralRe: PVOID pBuffer; access to data :confused: Pin
Dave Harper8-Oct-03 13:07
Dave Harper8-Oct-03 13:07 
QuestionConsole c++ global class? Pin
immanis8-Oct-03 7:06
immanis8-Oct-03 7:06 
My console app consists of several classes of objects that interact with each other based on user input and predefined conditions.

Say I have classes: house, street, building, car, and world. I only need one instance of the class world, we'll call it myworld, and I need each object to be able to access functions and attributes of myworld. World is already declared as a class in world.h and it is implemented in world.cpp. When I try to create myworld in my globals header file, all of the objects dont recognize it as a type. If I create myworld just before the main function, everything works, I get no errors, until I try to access it from other objects. For example, on creation of a building object, I want to be able to modify the myworld objects count of buildings in the world.

Some people have suggested simply making all of my classes subclasses in the class world, I really dont want to do that for sake of organization. My class definitions are long.

What is the best way to go about this? I just want one instance of a class thats available globally.
AnswerRe: Console c++ global class? Pin
Ryan_Roberts8-Oct-03 7:14
Ryan_Roberts8-Oct-03 7:14 
GeneralRe: Console c++ global class? Pin
immanis8-Oct-03 18:03
immanis8-Oct-03 18:03 
AnswerRe: Console c++ global class? Pin
David Crow8-Oct-03 8:17
David Crow8-Oct-03 8:17 
GeneralSplitter Window Control Pin
Lea Hayes8-Oct-03 6:39
Lea Hayes8-Oct-03 6:39 
GeneralRe: Splitter Window Control Pin
David Crow8-Oct-03 6:43
David Crow8-Oct-03 6:43 
GeneralPrinting size -bmp-help needed! Pin
radha vijay8-Oct-03 5:25
radha vijay8-Oct-03 5:25 
GeneralRe: Printing size -bmp-help needed! Pin
David Crow8-Oct-03 6:45
David Crow8-Oct-03 6:45 
GeneralRe: Printing size -bmp-help needed! Pin
Alex Dolpfin9-Oct-03 3:49
Alex Dolpfin9-Oct-03 3:49 
GeneralRe: One application for two Operating Systems Pin
vcplusplus8-Oct-03 5:23
vcplusplus8-Oct-03 5:23 
Generaldisplaying of string in CEdit or CRichEditCtrl Pin
Neelesh K J Jain8-Oct-03 5:00
Neelesh K J Jain8-Oct-03 5:00 
GeneralRe: displaying of string in CEdit or CRichEditCtrl Pin
Niall Barr8-Oct-03 5:10
professionalNiall Barr8-Oct-03 5:10 
GeneralRe: displaying of string in CEdit or CRichEditCtrl Pin
David Crow8-Oct-03 6:46
David Crow8-Oct-03 6:46 
GeneralPrint Preview - Text extent differs at various zoom states Pin
Andy Latham8-Oct-03 4:43
Andy Latham8-Oct-03 4:43 
GeneralOne application for two Operating Systems Pin
ThakurSaab8-Oct-03 4:41
ThakurSaab8-Oct-03 4:41 
GeneralRe: One application for two Operating Systems Pin
Niall Barr8-Oct-03 4:57
professionalNiall Barr8-Oct-03 4:57 
GeneralGet license key Pin
Anonymous8-Oct-03 4:05
Anonymous8-Oct-03 4:05 
GeneralRe: Get license key Pin
Wes Aday8-Oct-03 4:38
professionalWes Aday8-Oct-03 4:38 

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.