I'm a complete noob when it comes to structs!!
if I had the struct:
does anyone no how to search through a struct through call by reference? thanks! Iv bin trying for hours and nothing worksCode:#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;}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



LinkBack URL
About LinkBacks
i tink i@d embarass myself if i posted what I wrote.



I used to be an adventurer like you... then I took an arrow to the knee.