Click here to Skip to main content
15,893,381 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 6:22
Mark Salsbery15-Sep-08 6:22 
GeneralRe: calling a static function Pin
steph515-Sep-08 6:46
steph515-Sep-08 6:46 
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 6:53
Mark Salsbery15-Sep-08 6:53 
GeneralRe: calling a static function Pin
CPallini15-Sep-08 7:39
mveCPallini15-Sep-08 7:39 
GeneralRe: calling a static function Pin
toxcct15-Sep-08 7:42
toxcct15-Sep-08 7:42 
GeneralRe: calling a static function Pin
CPallini15-Sep-08 7:51
mveCPallini15-Sep-08 7:51 
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 7:51
Mark Salsbery15-Sep-08 7:51 
GeneralRe: calling a static function Pin
CPallini15-Sep-08 7:55
mveCPallini15-Sep-08 7:55 
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 8:03
Mark Salsbery15-Sep-08 8:03 
GeneralRe: calling a static function Pin
steph515-Sep-08 6:31
steph515-Sep-08 6:31 
GeneralRe: calling a static function Pin
Mark Salsbery15-Sep-08 6:44
Mark Salsbery15-Sep-08 6:44 
GeneralRe: calling a static function Pin
steph515-Sep-08 6:54
steph515-Sep-08 6:54 
GeneralRe: calling a static function Pin
Rajesh R Subramanian17-Sep-08 23:00
professionalRajesh R Subramanian17-Sep-08 23:00 
QuestionImage Processing Question Pin
sherinsabry15-Sep-08 4:29
sherinsabry15-Sep-08 4:29 
AnswerRe: Image Processing Question Pin
Saurabh.Garg15-Sep-08 5:10
Saurabh.Garg15-Sep-08 5:10 

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.