Related questions
static and extern global variables in C and C++
I made 2 projects, the first one in C and the second one in C++, both work with same behavior.
C project:
header.h
int varGlobal=7;
main.c
#include <stdio.h>
#include <stdlib.h>
#include "header.h"
…
C/C++ global vs static global
Possible Duplicate:
Static vs global
I'm confused about the differences between global and static global variables. If static means that this variable is global only for the same file then why in two different files same name cause a name …
C++ singleton vs. global static object
A friend of mine today asked me why should he prefer use of singleton over global static object?
The way I started it to explain was that the singleton can have state vs. static global object won't...but then I …