Hi
I can't read a line using getline() function.using this code generates a runtime error at "iostream" file :

This is my code :

fstream InFile;
InFile.open("c:\\Colors.txt",ios::in);

InFile >> TargetCount;

char *a="12345";
InFile.getline(a,2); // The error is here

This is th error :

Unhandled exception at 0x5f6f3b6c (msvcp100d.dll) in camNew.exe: 0xC0000005: Access violation writing location 0x00b29d74.