Please help. I am trying to do that records the salerepresentative,his branch number and his sales using struct and repeat it 4 times. So here is my code but can you please tell me what I do wrong?
#include <iostream>
using namespace std;
struct info
{
char representative;
int branch;
int sales;
info is a type, data is your variable. The program has not a correct declaration for data, which should be an array of four info. Then you assign the values to the variable (data) :
@Frozen, I try the code and input mac as representative but why the output is "Enter sales representativemac Enter salesEnter branchEnter sales representativeEnter salesEnter branchEnter sales representativeEnter salesEnter branchEnter sales representativeEnter salesEnter branch " What's wrong with my for loop? PLease help