Well, these are your errors. Stupid ones.
Code:
||=== Build: Debug in Template (compiler: GNU GCC Compiler) ===|
C:\Users\aryan\Desktop\Projects\Template\main.cpp||In function 'int main()':|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|58|error: 'time' was not declared in this scope; did you mean 'time_t'?|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: left operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|80|error: array must be initialized with a brace-enclosed initializer|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|86|error: 'worldlength' was not declared in this scope; did you mean 'wordlength'?|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|90|error: invalid types 'char[int]' for array subscript|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|104|warning: format '%c' expects argument of type 'int', but argument 2 has type 'int*' [-Wformat=]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|104|warning: format '%c' expects argument of type 'int', but argument 2 has type 'int*' [-Wformat=]|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|118|error: break statement not within loop or switch|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|124|error: expected '}' at end of input|
C:\Users\aryan\Desktop\Projects\Template\main.cpp|57|note: to match this '{'|
||=== Build failed: 6 error(s), 13 warning(s) (0 minute(s), 2 second(s)) ===|
Code:
srand(time(NULL)); // You forgot including the header file time.h
int guessedletter[11]=(0,0,0,0,0,0,0,0,0,0,0); // learn how to initialise arrays
for (loopIndex=0; loopIndex<worldlength;loopIndex++) // yes, worldlength is the correct spelling of wordlength
// Learn to indent your code
// characters are not arrays to be subscripted
// read about printf and format specifiers before using it