Thread: Is this c

  1. #1

    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
    Its C using windows API console functions

Popular pages Recent additions subscribe to a feed