Whee... hello.
I'm compiling with Dev-C++'s default compiler (MingW, as I understand it), on Windows XP. I doubt either of these are significant, but oh well...
Two small problems here.
Firstly, multiplication:
Right now, I've got
1 2 3 4 5
|
char[9] pdat;
loadedfile.read(pdat, 9);
int tdat;
(start for loop)
tdat = pdat[x]*(2^7-x)
|
From what my friend says, my problem(getting seemingly non-sensical values) is asterisk's double-meaning, as multiplication and "pointer" (a concept I'm not familiar with).
If that's the case, how do I tell the compiler that I want to multiply?
If it's not the case... I'm getting non-zero results where pdat[x]=0, and non-powers of 2 where pdat[x]=1 (loadedfile is just a text document of 1s and 0s), and I have no idea what's going on.
Second, I have several places in my program where it cin's a string used for a filename. However, it breaks when encountering whitespace.
I've tried:
1 2
|
cin >> noskipws;
cin >> filename;
|
and
cin.get(filename);
as seem to be suggested wherever I found online, but the first one doesn't seem to make any difference, and the second makes my compiler angry ("108 C:\...\main.cpp no matching function for call to `std::basic_istream<char, std::char_traits<char> >::get(std::string&)' ")