I want to read 8 byte from a file.
StreamReader^ sr = gcnew StreamReader( "ReadMe.txt" );
long convert = 0;
array<Char>^c = nullptr;
while ( sr->Peek() >= 0 )
{
c = gcnew array<Char>(8);
sr->Read( c, 0, c->Length );
convert = (long) c; //<- the problem
Console::WriteLine( c );
Console::WriteLine( convert );
}
but i get this output:
EA00A10C <- same as the file
37745844 <- wrong (even if convert dec to hex)
Note:
atoi does not take the type array, i did not found a array.ToInt function …
You are probably looking for