I've made some changes to your code:
#include <stdio.h>
int main(void)
{
unsigned char num1 = 19;
unsigned char num2 = 6;
Type: Posts; User: XayC
I've made some changes to your code:
#include <stdio.h>
int main(void)
{
unsigned char num1 = 19;
unsigned char num2 = 6;
If you want to initialize it you can do it this way (works with MS Visual C++ too):
int main(int argc, char** argv)
{
test newTest = {{0,1,2,3,4}};
printf("%d\n",newTest.iNum[0]);...
1) Yes you can, but you have to take care of the memory allocation for it. For example you can do:
struct _test
{
int *iNum;
};
// Somewhere else, where n is the size you like.
struct...
Here is a list of free compilers:
http://www.thefreecountry.com/compilers/cpp.shtml
I think MinGW (GCC for Windows platforms) should work without admin privileges but I'm not sure on Vista. You...
In addition to the change ZuK suggested you should also change this code:
temp=temp/16;
remainder=temp%16;
with the code:
remainder=temp%16;
In the first case aa is a char pointer. On 32bit machines pointers are 32bit = 4bytes, so that's why sizeof(aa) is returning 4.
In the second case aa is a vector of 100 elements, so sizeof will...