Click here to Skip to main content
15,908,173 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can i repair and compact the access2000 database using ado in vc? Pin
Alexinuk25-Nov-02 3:12
Alexinuk25-Nov-02 3:12 
Generalthe CDaodatabase dont support access2000 Pin
whelk25-Nov-02 14:52
whelk25-Nov-02 14:52 
GeneralToolbar dependent bitmaps in my Popup menus Pin
Mr Bose Dayala24-Nov-02 17:31
Mr Bose Dayala24-Nov-02 17:31 
GeneralCreating Line Count for CRich Edit Control Pin
E324-Nov-02 16:34
E324-Nov-02 16:34 
GeneralCustom compiler steps... Pin
Matt Gullett24-Nov-02 16:03
Matt Gullett24-Nov-02 16:03 
GeneralRe: Custom compiler steps... Pin
Chris Losinger24-Nov-02 16:33
professionalChris Losinger24-Nov-02 16:33 
Generalglobal variables Pin
pnpfriend24-Nov-02 15:42
pnpfriend24-Nov-02 15:42 
GeneralRe: global variables Pin
Christian Graus24-Nov-02 16:01
protectorChristian Graus24-Nov-02 16:01 
First of all, to fix this problem, declare the variable extern in your stdafx.h, and declare it in stdafx.cpp. Voila, visible everywhere.

Secondly, DON'T do this. Global variables are a terrible idea. If you must, then at least put them in a namespace. It's far better to make them members of your main window and access them that way.

Finally, you should investigate std::vector, check out the STL articles here on CP. CArray is really a terrible product, and is generally used by people who either don't know about the STL, or are put off by the awful docs in the MSDN. I've solved problem a, and the articles on this site will fix problem b. I think you'll be surprised how much nicer/powerful it is than the stuff that MFC ships.




Christian

No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002

Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002

Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
GeneralRe: global variables Pin
pnpfriend24-Nov-02 16:29
pnpfriend24-Nov-02 16:29 
GeneralRe: global variables Pin
Christian Graus24-Nov-02 17:23
protectorChristian Graus24-Nov-02 17:23 
Generaldatabase Pin
Shotgun24-Nov-02 15:12
Shotgun24-Nov-02 15:12 
GeneralRe: database Pin
Christian Graus24-Nov-02 15:17
protectorChristian Graus24-Nov-02 15:17 
GeneralRe: database Pin
Alexinuk25-Nov-02 3:15
Alexinuk25-Nov-02 3:15 
GeneralWINVER puzzle Pin
Antosha24-Nov-02 12:00
Antosha24-Nov-02 12:00 
Questionhelp!! how to pause a simulation? Pin
Anonymous24-Nov-02 9:45
Anonymous24-Nov-02 9:45 
GeneralDrive Properties Pin
georgiek5024-Nov-02 8:33
georgiek5024-Nov-02 8:33 
GeneralRe: Drive Properties Pin
Dominik Reichl24-Nov-02 8:43
Dominik Reichl24-Nov-02 8:43 
GeneralRe: Drive Properties Pin
georgiek5024-Nov-02 19:40
georgiek5024-Nov-02 19:40 
GeneralRe: Drive Properties Pin
Dominik Reichl25-Nov-02 1:15
Dominik Reichl25-Nov-02 1:15 
GeneralRe: Drive Properties Pin
georgiek5025-Nov-02 3:08
georgiek5025-Nov-02 3:08 
GeneralRe: Drive Properties Pin
georgiek5025-Nov-02 8:28
georgiek5025-Nov-02 8:28 
GeneralRe: Drive Properties Pin
Mike Nordell25-Nov-02 12:08
Mike Nordell25-Nov-02 12:08 
General[OpenGL] Problems with glGetString Pin
Dominik Reichl24-Nov-02 8:23
Dominik Reichl24-Nov-02 8:23 
GeneralRe: [OpenGL] Problems with glGetString Pin
Mike Nordell25-Nov-02 12:11
Mike Nordell25-Nov-02 12:11 
GeneralDrive Properties Pin
georgiek5024-Nov-02 5:44
georgiek5024-Nov-02 5:44 

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.