smiley face from a 2d vector of strings :(

Soldato
Joined
6 Apr 2008
Posts
3,352
Location
Reading
Hi everyone need urgent help please!

Im simulating a processors cache and memory system in c++, (final year uni c/w)

now i have a 2d vector that represents my physical cache, coloums represent words of cache and rows represent the index from a read in trace value.

Whats happening is, the function reads in a string called data this is an 8 char long hex value.

this string is then put in cache location cachearr[columns][rows];

now if i try and read that back to the win32 console application after just writing it, I get a stupid smiley face and no data.

Please help!!!! :(
 
Have you tried printing out the hex values as you read them to make sure you are reading something useful from the cache?

Definitely initialised the "cachearr" properly? You might not have initialised it properly so you are reading junk from memory.
 
Back
Top Bottom