Category : structure

A priority queue stores a collection of items Each item has a key value Main methods of the Priority Queue ADT insert(x) inserts an item x removeMax() (or removeMin()) removes and returns the item with max (or smallest) key Implement Priority queue with a sorted linked list Source: Windows Que..

Read more

this is my sample code which is similar to my project, to simplify I created this dummy program. #include <iostream> using namespace std; struct str1{ int a1; }; void fun(str1 *x); int main() { str1 s; fun(&s); cout<<"print "<<s.a1<<endl; return 0; } void fun(str1 *x){ struct test{int c1;}tst; tst.c1 =7; for(int i= 0; i<9;i++){ x->a1=tst.c1; ..

Read more

struct Subject { char SubName[30]; int Hakjumm; char Grade[10]; float GPA; }; struct Student { char StdName[30]; int Hakbun; Subject* Sub; int SubNum; float AveGPA; }; This function searches for the student’s name in the structure and returns the address of the student’s name if there is a matching student. Student* StdSearch(Student* pSt, char name[]) ..

Read more

I try to create a list of objects and increase its size by 1 if necessary by deleting the old list and creating a new one larger, but it gives an warning and then it breaks Warning C6385 Reading invalid data from ‘new_pers’: the readable size is ‘(unsigned int)*28+4′ bytes, but ’56’ bytes may be ..

Read more