Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to find the number of same items in two STL vectors Pin
ZoogieZork8-Nov-03 8:03
ZoogieZork8-Nov-03 8:03 
GeneralSend Sms using visaul c++ 6 Pin
nolanl8-Nov-03 3:04
nolanl8-Nov-03 3:04 
GeneralRe: Send Sms using visaul c++ 6 Pin
Peter Molnar8-Nov-03 5:28
Peter Molnar8-Nov-03 5:28 
GeneralRe: Send Sms using visaul c++ 6 Pin
nolanl9-Nov-03 23:31
nolanl9-Nov-03 23:31 
GeneralCButton declaration Pin
Ahmed Galal8-Nov-03 2:30
Ahmed Galal8-Nov-03 2:30 
GeneralRe: CButton declaration Pin
Antti Keskinen8-Nov-03 12:05
Antti Keskinen8-Nov-03 12:05 
GeneralRe: CButton declaration Pin
Ahmed Galal8-Nov-03 12:11
Ahmed Galal8-Nov-03 12:11 
Generalclass with static functions and variables Pin
Kuniva8-Nov-03 0:00
Kuniva8-Nov-03 0:00 
Hi, i'm making a class that has all static functions and variables in it. When i first made a few private static variables it gave me a linker error about unresolved externals. But then i found that if you initialized the values in your .cpp file then it didn't give those errors. But one of the variables i'm declaring is an array of a struct which is also declared as private in my class. But now my problem is, how do i initialize the array? i mean, i can't just initialize the array to NULL because well.. the types don't match. Here's an example:

.h file:

class blablabla
{
private:
struct somestruct
{
  int int1;
  int int2;
}

static somestruct myarray[10];
static int someint;

public:
   // Some public functions
}

.cpp file:

blablabla::someint = 0; // This is fine
blablabla::myarray = ??? // mu? Can't type NULL, and can't do (somestruct*)NULL either


Kuniva
--------------------------------------------
GeneralRe: class with static functions and variables Pin
ZoogieZork8-Nov-03 2:47
ZoogieZork8-Nov-03 2:47 
GeneralRe: class with static functions and variables Pin
Anonymous8-Nov-03 3:25
Anonymous8-Nov-03 3:25 
GeneralRe: class with static functions and variables Pin
Kuniva8-Nov-03 4:20
Kuniva8-Nov-03 4:20 
GeneralWin32 message window Pin
pranavamhari7-Nov-03 23:33
pranavamhari7-Nov-03 23:33 
GeneralRe: Win32 message window Pin
Antti Keskinen8-Nov-03 12:18
Antti Keskinen8-Nov-03 12:18 
GeneralRe: Win32 message window Pin
Peter Molnar8-Nov-03 13:37
Peter Molnar8-Nov-03 13:37 
GeneralRe: Win32 message window Pin
pranavamhari8-Nov-03 15:05
pranavamhari8-Nov-03 15:05 
QuestionDo streams always have to be passed by reference? Pin
Link26007-Nov-03 22:44
Link26007-Nov-03 22:44 
AnswerRe: Do streams always have to be passed by reference? Pin
Andrew Walker8-Nov-03 13:17
Andrew Walker8-Nov-03 13:17 
General.lib in 6.0 Pin
LOSTTWARE.com7-Nov-03 21:11
LOSTTWARE.com7-Nov-03 21:11 
GeneralRe: .lib in 6.0 Pin
Mike Dimmick7-Nov-03 23:21
Mike Dimmick7-Nov-03 23:21 
GeneralChanging Printer Resolution at Run Time Pin
Tejas H Shah7-Nov-03 20:55
Tejas H Shah7-Nov-03 20:55 
GeneralLooping through all Outlook folders Pin
Anonymous7-Nov-03 20:33
Anonymous7-Nov-03 20:33 
GeneralLooping through all Outlook folders Pin
Anonymous7-Nov-03 20:33
Anonymous7-Nov-03 20:33 
GeneralRe: Looping through all Outlook folders Pin
Amit Dey8-Nov-03 0:43
Amit Dey8-Nov-03 0:43 
GeneralRe: Looping through all Outlook folders Pin
p_peto1-Jun-05 19:39
p_peto1-Jun-05 19:39 
GeneralDirectShow Video Standard Question Pin
Atif Mushtaq7-Nov-03 19:59
Atif Mushtaq7-Nov-03 19:59 

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.