Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-16-2009, 11:48 PM   #1
Registered: Oct 2004
Location: Venezuela
Distribution: Open SuSE v.-11.1.
Posts: 36

Rep: Reputation: 15
Question OS Validation on C++

Hey buddies!

Simple question?

How can I write a C++ code that knows in which OS is it running?

I mean, how can I validate this?

Old 04-17-2009, 12:53 AM   #2
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
The simplest way is to use OS-specific predefined macros
Old 04-17-2009, 01:31 AM   #3
Registered: Oct 2004
Location: Venezuela
Distribution: Open SuSE v.-11.1.
Posts: 36

Original Poster
Rep: Reputation: 15

I made my macros for it!

Thanks for the tip!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Validation nolinuxnollife Linux - Desktop 5 10-06-2007 09:14 AM
xml validation kshkid Programming 1 05-02-2007 02:46 AM
terminal validation xviddivxoggmp3 Red Hat 5 03-13-2007 01:44 PM
Need Your Validation scbops Linux - Newbie 1 12-27-2006 06:09 AM
Validation Makaveli.2003 Programming 1 05-06-2002 09:30 AM

All times are GMT -5. The time now is 05:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration