#include<stdio.h>
#include<cs50.h>
#include<string.h>
int main(void)
{
string name = get_string("Enter: ");
printf("%s\n",name);
int n = strlen(name);
printf("%i\n",n);
for(int i = 0, i < n, i++)
while name[i] != ("\0");
printf("%i",name[i]);
}
Getting this error message (with helpcs50 make caesar):
Asking for help...
caesar.c:10:16: error: redefinition of 'i'
Not quite sure how to help, but focus your attention on line 10 of caesar.c! caesar/ $
Unable to figure out redefinition of i, i is not defined earlier in this code. %i on the previous line is something different.
for
loop? It is not comma (,).