so im begining some project, and to try to check my work im trying to print out results as of point x to see whats going on. I just started and im already stuck, and I cant find any reason why I am getting an error.

Here im trying to create and array, all blank, then print out all the elements within the array.

#include <stdio.h>

int main()
{
	
	unsigned char imgSet[10] = {0} ;
	printf('%c', imgSet[] );
}

Try this and you'll display the first element in imgSet.

printf("%c", imgSet[0] );

nevermind this, I found the issue now after reading up on arrays for about an hour. The '%c' should have been a "%c".

Amazing how fast Daniweb has helped me XD

#include <stdio.h>

int main()
{

    unsigned char imgSet[10] = {0} ;
    printf('%c', imgSet[] );
}

Try this and you'll display the first element in imgSet.

printf('%c', imgSet[0] );

yeh, i was getting that, but seems to be an issue with the apostraphes instead of quotation marks. with 'c' I was getting some weird error messages for some reason.

ty though ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.