Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionC++ reading out memory specs [modified] Pin
Fatbuddha 124-Mar-09 5:11
Fatbuddha 124-Mar-09 5:11 
AnswerRe: C++ reading out memory specs Pin
Michael Schubert24-Mar-09 5:23
Michael Schubert24-Mar-09 5:23 
GeneralRe: C++ reading out memory specs Pin
Fatbuddha 124-Mar-09 5:33
Fatbuddha 124-Mar-09 5:33 
GeneralRe: C++ reading out memory specs Pin
Michael Schubert24-Mar-09 5:45
Michael Schubert24-Mar-09 5:45 
GeneralRe: C++ reading out memory specs Pin
Fatbuddha 124-Mar-09 6:19
Fatbuddha 124-Mar-09 6:19 
GeneralRe: C++ reading out memory specs Pin
Michael Schubert24-Mar-09 6:28
Michael Schubert24-Mar-09 6:28 
GeneralRe: C++ reading out memory specs Pin
David Crow24-Mar-09 6:39
David Crow24-Mar-09 6:39 
AnswerRe: C++ reading out memory specs Pin
Iain Clarke, Warrior Programmer24-Mar-09 8:39
Iain Clarke, Warrior Programmer24-Mar-09 8:39 
You can't compile a program and expect it to then be copied to any computer and run. So, it's not that bad to make a function in your own code that does different things depending on which operating system it is compiled for (you may be cross compiling for all I know)

Ie:
DWORD HowManyMegaBytesDoIHave ()
{
#ifdef _WINDOWS
  return ThatWindowsAPIFunction ();
#endif
#ifdef _MACOS9
etc

}


I hope that made sense. I'm pretty sure the windows one is real, no idea about the other, but they're just meant to illustrate. You'll have to the same #ifdef with the headers too.

If you want one codebase to work identically on all OS's, then you'll have to scale back your desires a long way.

Good luck,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

GeneralRe: C++ reading out memory specs Pin
Fatbuddha 126-Mar-09 22:52
Fatbuddha 126-Mar-09 22:52 
Questionsegmentation fault en strcat() Pin
sankariyo24-Mar-09 4:58
sankariyo24-Mar-09 4:58 
AnswerRe: segmentation fault en strcat() Pin
Code-o-mat24-Mar-09 5:17
Code-o-mat24-Mar-09 5:17 
GeneralRe: segmentation fault en strcat() Pin
sankariyo24-Mar-09 22:26
sankariyo24-Mar-09 22:26 
GeneralRe: segmentation fault en strcat() Pin
Code-o-mat24-Mar-09 23:04
Code-o-mat24-Mar-09 23:04 
AnswerRe: segmentation fault en strcat() Pin
Michael Schubert24-Mar-09 5:37
Michael Schubert24-Mar-09 5:37 
GeneralRe: segmentation fault en strcat() Pin
sankariyo24-Mar-09 22:39
sankariyo24-Mar-09 22:39 
QuestionRe: segmentation fault en strcat() Pin
David Crow24-Mar-09 6:20
David Crow24-Mar-09 6:20 
AnswerRe: segmentation fault en strcat() Pin
CPallini24-Mar-09 7:09
mveCPallini24-Mar-09 7:09 
GeneralRe: segmentation fault en strcat() Pin
David Crow24-Mar-09 7:14
David Crow24-Mar-09 7:14 
GeneralRe: segmentation fault en strcat() Pin
CPallini24-Mar-09 7:25
mveCPallini24-Mar-09 7:25 
GeneralRe: segmentation fault en strcat() Pin
sankariyo24-Mar-09 22:42
sankariyo24-Mar-09 22:42 
GeneralRe: segmentation fault en strcat() Pin
CPallini24-Mar-09 22:48
mveCPallini24-Mar-09 22:48 
AnswerRe: segmentation fault en strcat() Pin
SrivathsanRaghavan11-Dec-12 19:37
SrivathsanRaghavan11-Dec-12 19:37 
QuestionCRunTimeClass with parameters Pin
prithaa24-Mar-09 4:20
prithaa24-Mar-09 4:20 
AnswerRe: CRunTimeClass with parameters Pin
Akt_4_U24-Mar-09 6:12
Akt_4_U24-Mar-09 6:12 
GeneralRe: CRunTimeClass with parameters Pin
prithaa24-Mar-09 6:23
prithaa24-Mar-09 6:23 

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.