printf C issues

Status
Not open for further replies.

ukpc5

New Member
hi i've got a program

which is written like this

part1*

printf("0/n")
printf("0/n")
printf("0/n")
printf("0/n")


part2*
printf("1/n")
printf("1/n")
printf("1/n")
printf("1/n")

im trying to get it to print both at the same time and i'm aimming to get it to print like
0 1
0 1
0 1
0 1

howerver its printing like this
0
0
0
0
1
1
1
1

is there a way to get it to print like the 1st way with out having it like printf("0/n") printf("1/n")
i've been trying to find a command to work with print f in that way however no joy yet any suggesstions?
 
"\n" means newline.... printf("0 1\n");

OR printf("0 "); printf("1\n");
 
Last edited:
thanks ian i realise that the /n means new line so it would shift it down however i'm using the 0's to create a shape specificly the 0's would make the shapes of numbers for a display i was just wondering if there was a command that would make it possply to write a few things but allow the next print f to start back on the same level again
 
if you need to create a sort of bitmap.

printf("0 0 0 0 0\n\r");
printf(" 0 0 0 0 \n\r);
printf("0 0 0 0 0\n\r);

the \r returns to the fist column.
 
If you omit \n whatever next you print will be on the same line.
Also,I see you need something like gotoxy() function, (in winapi it's called differently) .
 
Last edited:
I think it would be professional and practical to format the display data first in RAM, then just print each RAM line to a line.

Trying to format XY matrixed text characters at the time it actually prints seems very funky to me.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…