Its almost like the 8 bit registers cant be used, because when I tryed this it also did not work, and I got more junk. I make k be the values i entered in the first program, but I got more junk, junk junk. Every time I use an 8 bit data type I get crap.
any ideas?
In your first program, you're trying to output the ASCII values 9 and 10, which are tab and line feed. If you want to output them as integers, you need to first convert them: std::cout <<(int)j[0]<<" "<<(int)j[1];
As for your second program, since you're using _tmain() I can assume you're on Windows, and most likely using an x86. x86 is little endian, so p[0]==10 and p[1]==9.
thanks, I was using uint8_t also and when I use cout i didnt know it would convert a numeric value to the ASCII value. I was trying to get the numeric values.
That's because uint8_t is equivalent to an unsigned char. uint32_t is equivalent to an unsigned int, which would output the actual number rather than its ASCII equivalent.