#include <cs50.h>
#include <stdio.h>
int main(void)
{
int height;
do
{
height = get_int("height: ");
} while (height < 1 || height> 8);
const char block = '#' ;
for (int i = 0; i<10; i++)
{
printf(block)
}
}
So this is my code, and this is the error message:
mario.c:18:12: error: incompatible integer to pointer conversion passing 'const char' to parameter of type 'const char *'; take the address with & [-Werror,-Wint-conversion]
printf(block)
^~~~~
&
/usr/include/stdio.h:332:43: note: passing argument to parameter '__format' here
extern int printf (const char *__restrict __format, ...);
not sure what im doing wrong, ive tried printf(%, block) but this isnt right either.
any help appreciated.