Hi everyone,
I'm a student ICT and my project is to make a sort of "ticket" (from a market or something)
I have almost searched the whole world 'round to find how to get time&date. Finally I found it, but it's writting in C instead c++, that's not really a problem. But now those colors... that's something else... I know their are codes like this -> \e[0;31m (for red)

but when i compile this, it complains because "e" don't has a value...

I'll give you all what I have

this is the time&date

Code:
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <iomanip>
using namespace std;

int main ()
{
  time_t rawtime;

  time ( &rawtime );
  setw(12);
  printf ("%s", ctime (&rawtime) );
  
  return 0;
}
and this is for the colors

Code:
// Om de kleuren te kunnen instellen is er een speciaal attribuut dat moet ingesteld worden. Deze heeft de naam: ansi.sys
// voor meer info kan je deze website bezoeken -> http://www.pcxt-micro.com/ansi.html

#include<iostream>
using namespace std;
int main () {

cout<< $e[31m<< "Hallo C++";
	
cout<< [31m<< "Dit is een tweede poging!";

return 0;
}
thx for all your respons