Is this c

This is a discussion on Is this c within the C Programming forums, part of the General Programming Boards category; Can someone tell me if this is pure c code or c++, I have to write a program in c ...

  1. #1
    Unregistered
    Guest

    Unhappy Is this c

    Can someone tell me if this is pure c code or c++, I have to write a program in c but im using the VS c++ compiler!

    //It changes the colour of the text on screen
    #include <windows.h>
    #include <stdio.h>

    #include <conio.h>


    int main()
    {

    HANDLE hStdout;
    hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(hStdout, FOREGROUND_RED);

    printf("Red Text");

    return 0;
    }

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Its C using windows API console functions

Popular pages Recent additions subscribe to a feed

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