Click here to Skip to main content
15,910,130 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMessage Only Window? Pin
Joseph Marzbani15-Sep-08 7:22
Joseph Marzbani15-Sep-08 7:22 
AnswerRe: Message Only Window? Pin
James R. Twine15-Sep-08 7:30
James R. Twine15-Sep-08 7:30 
AnswerRe: Message Only Window? Pin
auralius manurung15-Sep-08 17:52
auralius manurung15-Sep-08 17:52 
QuestionStudio Tools - Spy++ Pin
john john mackey15-Sep-08 7:20
john john mackey15-Sep-08 7:20 
QuestionRSA Encryption/Decryption Pin
Kdss15-Sep-08 5:28
Kdss15-Sep-08 5:28 
AnswerRe: RSA Encryption/Decryption Pin
SandipG 15-Sep-08 5:49
SandipG 15-Sep-08 5:49 
Questioncalling a static function Pin
steph515-Sep-08 5:26
steph515-Sep-08 5:26 
AnswerRe: calling a static function Pin
Mark Salsbery15-Sep-08 5:39
Mark Salsbery15-Sep-08 5:39 
GeneralRe: OT Pin
toxcct15-Sep-08 5:44
toxcct15-Sep-08 5:44 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 5:45
Mark Salsbery15-Sep-08 5:45 
GeneralRe: OT Pin
toxcct15-Sep-08 5:48
toxcct15-Sep-08 5:48 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 5:59
Mark Salsbery15-Sep-08 5:59 
GeneralRe: OT Pin
john john mackey15-Sep-08 7:24
john john mackey15-Sep-08 7:24 
GeneralRe: OT Pin
David Crow15-Sep-08 5:53
David Crow15-Sep-08 5:53 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 6:01
Mark Salsbery15-Sep-08 6:01 
GeneralRe: OT Pin
CPallini15-Sep-08 6:10
mveCPallini15-Sep-08 6:10 
GeneralRe: OT Pin
toxcct15-Sep-08 7:22
toxcct15-Sep-08 7:22 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 7:30
Mark Salsbery15-Sep-08 7:30 
GeneralRe: OT Pin
toxcct15-Sep-08 7:40
toxcct15-Sep-08 7:40 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 7:46
Mark Salsbery15-Sep-08 7:46 
GeneralRe: OT Pin
Mark Salsbery15-Sep-08 7:55
Mark Salsbery15-Sep-08 7:55 
GeneralRe: OT Pin
CPallini15-Sep-08 7:48
mveCPallini15-Sep-08 7:48 
GeneralRe: calling a static function Pin
steph515-Sep-08 5:58
steph515-Sep-08 5:58 
Hi I was in the understanding that if you declare a static function it can only be called from the source file where it is declared.
Am I missing something??

The error says "unresolved external symbol"
the call to the function is in file1.cpp where I have:

myClass::myFunction(variable1, variable2);

In myClass.h I have:

class myClass
{
static void myFunction
}

and in myClass.cpp I have the function definition:

myClass::myFunction()
{
//function definition
}

I can't call myFunction from file1.cpp

As you can tell I am a novice programmer and in desperate need of explanation Frown | :(
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 6:13
Mark Salsbery15-Sep-08 6:13 
GeneralRe: calling a static function Pin
CPallini15-Sep-08 6:14
mveCPallini15-Sep-08 6:14 

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.