N
Nezhate
I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
......
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
......
Pietro Cerutti said:Nezhate said:I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
.....
4 o'clock.
Nezhate said:I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
.....
Jensen Somers said:James said:Nezhate said:I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
.....
No, you do not have a function. You have a syntax error. The simplest
correction would probably be to add either a ';' or a '{' somewhere
between the end of the first line and the start of the second line,
depending upon whether you intended to declare 'function', or define it.
There are many other possibilities; only you can know which one applies.
Addition: if you are using a compiler < C99 (such as Visual Studio to
compile C code) your code will not compile because you are trying to
create a variable sized array which is not supported. Using Visual Studio
the size of your array should be known at compile time. (Unless you are
allocating the memory yourself.)
James said:Nezhate said:I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
.....No, you do not have a function. You have a syntax error. The simplest
correction would probably be to add either a ';' or a '{' somewhere
between the end of the first line and the start of the second line,
depending upon whether you intended to declare 'function', or define it..
There are many other possibilities; only you can know which one applies..
Addition: if you are using a compiler < C99 (such as Visual Studio to
compile C code) your code will not compile because you are trying to
create a variable sized array which is not supported. Using Visual
Studio the size of your array should be known at compile time. (Unless
you are allocating the memory yourself.)
James said:Nezhate said:I have a function like this
char * function (int input)
static char array1 [sizeof (input) * 8 + 1];
.....No, you do not have a function. You have a syntax error. The simplest
correction would probably be to add either a ';' or a '{' somewhere
between the end of the first line and the start of the second line,
depending upon whether you intended to declare 'function', or define it.
There are many other possibilities; only you can know which one applies.
Addition: if you are using a compiler < C99 (such as Visual Studio to
compile C code) your code will not compile because you are trying to
create a variable sized array which is not supported. Using Visual
Studio the size of your array should be known at compile time. (Unless
you are allocating the memory yourself.)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.