I've just ran a few tests and it seems the definition of char *text[][7] isn't the one i want. The [7] doesn't stand for the number of chars in each string, but for the number of strings in each "row". Therefore I can write
char *text[][3],
but the chars of each string are only...
Thanks for your replys!
It's clearer to me now. The right way for my definition would be
const char *text[][7] = ...
where the 7 is the lenght of my longest string + 1. Right?
Another question: Does the const matter? Would
char *anonymous = "Hello Mr. Bill"
also be correct? Or...
Hi erveryone!
I'm quite new to C programming and I'm not sure whether the following little programm is correct and why it crashes with a single line uncommented. Heres the prog:
/***************************************/
#include <stdio.h>
int main(int argc, char *argv[])
{
const char...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.