Vivod is not found C3861 | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Vivod is not found C3861

#include "pch.h" #include <iostream> using namespace std; struct tar { char str[50]; int a[5]; int b[5]; }; int i; int main() { struct tar get; cout « "Enter a string " « endl; cin » get.str; cout « "Enter the first array " « endl; for (i = 0; i, 5; i++) cin » get.a[i]; cout « "Enter a second array " « endl; for (i = 0; i < 5; i++) cin » get.b[i]; vivod(get); return 0; } void vivod(struct tar get) { cout « get.str « endl; for (i = 0; i < 5; i++) cout « get.a[i] « ' ' « endl; for (i = 0; i < 5; i++) cout « get.b[i] « ' ' « endl; }

23rd Dec 2018, 7:15 PM
Akmal
1 Antwort
+ 1
Can you put the code in the playground. The Vivid is not found but I have not seen any Vivid in your code only Vivod. using "get" as name of a struct is very riskfull, since this is a keyword. Also notice that having a struct with the same name as a parameter of a method can be confusing struct tar get; vivod(get); void vivod(struct tar get) It should be like this struct tar VariableA vivod(VariableA) void vivod(struct tar VariableB) { for (i = 0; i < 5; i++) cout « VariableB.a[i] « ' ' « endl; } Please try to use more descriptive names
23rd Dec 2018, 8:52 PM
sneeze
sneeze - avatar