I am using a version of gcc that allows me to create programs for windows while using unix. i am trying to like the wsock32 library to the program for compiling it, but it does not seems to be working. it also does not seem to find the header files i added even though they are in the same...
I am new to programing. I have had a little experiance with C and C++ but wanted to learn a language that was faster and closer to the computer. However, I was wondering how can assembler be closer to the computer than C when many assembler compilers are written in C?
Thank you, this solved the problem of it not taking the hex numbers, but it is giving me the wrong answers?
The first answer for the set
nArg1 = 0x1234
nArg2 = 0x00ff
should be
0x34
i am getting
0x52
I am new to c++ and have had no problems until i got to bitwise logic operations. I compiled the code from a book i have and i can't get it to work right. I can get it to take in two variables but it won't treat them like hex numbers. If i enter someting like 00ff as an argument it won't work...
I am new to c++ and have had no problems until i got to bitwise logic operations. I compiled the code from a book i have and i can't get it to work right. I can get it to take in two variables but it won't treat them like hex numbers. If i enter someting like 00ff as an argument it won't work...
I tried the suggestions and now it will take in both variables (thank you for helping with that) but it doesn't treat them as hex, if i put in 00ff first it won't take the second one, and if i put it in second (which i should not have to) it just uses the first one.
I am pretty new to c++ and have had a pretty easy time with it till i got to bitwise logic operations. I tried an example program out of a book I have and can't get it to work.
The code is:
#include <stdio.h>
#include <iostream.h>
int main(int nArg, char* nArgs[ ])
{
cout.setf ( ios::hex);
int...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.