System Information in C++

This is a discussion on System Information in C++ within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm looking for a way to grab the operating system that the program in running on. eg. Microsoft Windows ...

  1. #1
    333
    333 is offline
    Registered User
    Join Date
    Jun 2008
    Posts
    2

    System Information in C++

    Hi, I'm looking for a way to grab the operating system that the program in running on. eg. Microsoft Windows XP

    I can display the info I want with
    system("VER");

    But I can't get it into a string so the program can't read it.

    Can anyone help?

    Thanks

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,556
    Use GetSystemInfo (system information), GetVersion (for getting what Windows OS it is).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 09:25 AM
  2. Replies: 6
    Last Post: 07-07-2008, 07:48 AM
  3. School Mini-Project on C/C++ (Need Your Help)..
    By EazTerence in forum C++ Programming
    Replies: 4
    Last Post: 09-08-2005, 01:08 AM
  4. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 06:12 AM
  5. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21