I realise this is an incredibly noob question, but I've googled for it and can't seem to find an answer (probably because I've worded the question wrong... feel free to fix if I have)
So I have this code:
int main(int argc, char* argv[])
{
puts(argv[1]);
return 0;
}
It works fine if I've passed a parameter to my program, but if I haven't, then obviously it's going to fail since it's trying to index a non-existent element of the array.
How would I find how many elements in in my string array?