Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: name decoration issue in DLL Pin
Bram van Kampen31-Oct-08 15:45
Bram van Kampen31-Oct-08 15:45 
QuestionBitmap on Wizrad [modified] Pin
john56325-Oct-08 0:29
john56325-Oct-08 0:29 
AnswerRe: Bitmap on Wizrad Pin
Hamid_RT5-Oct-08 2:04
Hamid_RT5-Oct-08 2:04 
GeneralRe: Bitmap on Wizrad Pin
john56325-Oct-08 3:07
john56325-Oct-08 3:07 
QuestionStatic variable in c/c++ Pin
Subrat 47082665-Oct-08 0:26
Subrat 47082665-Oct-08 0:26 
AnswerRe: Static variable in c/c++ Pin
montiee5-Oct-08 1:07
montiee5-Oct-08 1:07 
GeneralRe: Static variable in c/c++ Pin
Subrat 47082666-Oct-08 17:30
Subrat 47082666-Oct-08 17:30 
GeneralRe: Static variable in c/c++ Pin
montiee8-Oct-08 1:24
montiee8-Oct-08 1:24 
file1.c
-------
int counter = 1;

file2.h
-------
extern int counter;

file2.c
---------
#include "file2.h"
void countToTen()
{
while (counter <= 10) {
printf("%d\n", counter++);
}
}

Notice that counter is defined in the file.c file hence to access it we need to define it as external to our file2.c file that uses it. Hope that gives you an idea about extern vars. Similar principle applies to extern functions.

You really need to read some books on the topic.
GeneralRe: Static variable in c/c++ Pin
Subrat 47082668-Oct-08 3:13
Subrat 47082668-Oct-08 3:13 
QuestionAutomatically appending an auto incrementing build number to Apps title in Visual Studio 2009..? [modified] Pin
montiee4-Oct-08 23:31
montiee4-Oct-08 23:31 
AnswerRe: Automatically appending an auto incrementing build number to Apps title in Visual Studio 2009..? Pin
Bram van Kampen5-Oct-08 2:49
Bram van Kampen5-Oct-08 2:49 
GeneralRe: Automatically appending an auto incrementing build number to Apps title in Visual Studio 2009..? Pin
montiee7-Oct-08 22:15
montiee7-Oct-08 22:15 
GeneralRe: Automatically appending an auto incrementing build number to Apps title in Visual Studio 2009..? Pin
Bram van Kampen9-Oct-08 15:54
Bram van Kampen9-Oct-08 15:54 
Questiondebugging release version build issue in managed code Pin
George_George4-Oct-08 22:07
George_George4-Oct-08 22:07 
QuestionDialog question Pin
yellowine4-Oct-08 18:52
yellowine4-Oct-08 18:52 
AnswerRe: Dialog question Pin
Cedric Moonen4-Oct-08 21:38
Cedric Moonen4-Oct-08 21:38 
AnswerRe: Dialog question Pin
bxveer5-Oct-08 3:53
bxveer5-Oct-08 3:53 
GeneralRe: Dialog question Pin
yellowine5-Oct-08 19:01
yellowine5-Oct-08 19:01 
Questionhow to run sample files Pin
tom4_254-Oct-08 17:54
tom4_254-Oct-08 17:54 
AnswerRe: how to run sample files Pin
CPallini4-Oct-08 21:46
mveCPallini4-Oct-08 21:46 
GeneralRe: how to run sample files Pin
tom4_255-Oct-08 2:16
tom4_255-Oct-08 2:16 
GeneralRe: how to run sample files Pin
CPallini5-Oct-08 7:46
mveCPallini5-Oct-08 7:46 
GeneralRe: how to run sample files Pin
Hamid_RT6-Oct-08 1:52
Hamid_RT6-Oct-08 1:52 
QuestionHow to assign the value of a default argument for a ActiveX method Pin
followait4-Oct-08 16:31
followait4-Oct-08 16:31 
AnswerRe: How to assign the value of a default argument for a ActiveX method Pin
User 2155974-Oct-08 21:12
User 2155974-Oct-08 21:12 

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.