How do I make this piece of code work? I have the dimension of the string at run-time...
void Sub1(int Count) {
char nrstr[Count];
.
.
.
}
or
{
int k;
k = f1();
char nrstr[k];
}
If your answer is dynamic allocation, how do I do that (define vars; add, remove items)?
In the following code:
void main(int argc, char *argv[]) {
if (argc == 3 )
if (argv[1] == 'c') { //doesn't work
int m;
m = atoi(argv[2]); //doesn't work
}
}
The parameters are c 201.
The lines marked give me an error. I think I know why but I don't know how to resolve it or how to...
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.