pass by reference .... HELP!!
I'm a complete noob when it comes to structs!!
if I had the struct:
Code:
#include<iostream>
using namespace std;
typedef struct info{
char name[20];
int age;
}Info;
int main (){
Info *pInfo = new Info[10];
int i=0;
while (i<10){
cout<<"Name -> ";
cin>> pInfo[i].name;
cout<<"Age -> ";
cin>>pInfo[i].age;
i++;
}
return 0;}
does anyone no how to search through a struct through call by reference? thanks! Iv bin trying for hours and nothing works :( i tink i@d embarass myself if i posted what I wrote.
ps
Its for an assignment so I only want pointers .. no pun intended ... so I can learn meself