I was just wondering how can i make a multiline string array I want to make a ascii art on a pair of dice
I was just wondering how can i make a multiline string array I want to make a ascii art on a pair of dice
If you're talking about using one "char" array to store many "lines" of text, just separate each "line" with the newline character, '\n', i.e.Code:char * lines = "line 1\nline 2\n";
isn't there something that I can use to make a picture sorta like this I know you can do it in python i think its like an array using ''' quote marks
Code:" +-------------+ | | | | +-------------+ "
sorry for my bad picture
actually this is what it looks like in python I was just wondering can I do this in c
Code:HANGMANPICS = [''' 4. 5. +------+ 6. | | 7. | | 8. | 9. | 10. | 11. | 12. | 13. | 14. | 15. | 16. ==============''', '''
the hangman pic didn't format right but you get my drift
But you have to write the \n in yourself.Code:char *lines = "+---+\n" "| * |\n" "+---+\n";
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Hey thanks that helps a lot