Aktualizovat du5/program.c
This commit is contained in:
parent
24ab3be1c3
commit
184ce88d49
@ -103,7 +103,7 @@ void goThroughTheTree(int rootIndex)
|
||||
int main()
|
||||
{
|
||||
char buffer[SIZE];
|
||||
bool isErr; //pomocna error premena
|
||||
bool isErr = false; //pomocna error premena
|
||||
|
||||
//null-terminovanie
|
||||
buffer[0] = '\0';
|
||||
@ -113,7 +113,7 @@ int main()
|
||||
{
|
||||
//prestane citat vstup, ak je NEPLATNY (rovna sa Newline symbolu, resp. prazdny riadok)
|
||||
//ALEBO ak sa nenacital riadok vobec (buffer je uplne prazdny, (resp prvy prvok je null terminator))
|
||||
if (strcmp(buffer, "\n") == 0 || buffer[0] = '\0')
|
||||
if (strcmp(buffer, "\n") == 0 || buffer[0] == '\0')
|
||||
{
|
||||
isErr = true;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user