Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ add object to array

int main()
{
	Student st[5];
	for( int i=0; i<5; i++ )
	{
		cout << "Student " << i + 1 << endl;
		cout << "Enter name" << endl;
		st[i].getName();
		cout << "Enter marks" << endl;
		st[i].getMarks();
	}
Comment

PREVIOUS NEXT
Code Example
Cpp :: height of bst cpp 
Cpp :: c++ get full line of input 
Cpp :: mkdir c++ 
Cpp :: how to create array with not constant size in cpp 
Cpp :: string stream in c++ 
Cpp :: return array from function c++ 
Cpp :: how to remove an element from a vector by value c++ 
Cpp :: sieve cpp 
Cpp :: c++ get environment variable 
Cpp :: create file c++ 
Cpp :: bitwise count total set bits 
Cpp :: c++ for else 
Cpp :: count bits c++ 
Cpp :: casting c++ 
Cpp :: c++ vector size 
Cpp :: upcasting in c++ 
Cpp :: how to sort a string alphabetically in c++ 
Cpp :: C++ Structures (struct) 
Cpp :: for loop c++ 
Cpp :: iterate over vector in c++ 
Cpp :: find second highest number in c++ 
Cpp :: c++ vector resize 
Cpp :: 3d vector c++ resize 
Cpp :: Setting a number of decimals on a float on C++ 
Cpp :: convert 2d array to 1d c++ 
Cpp :: priority queue in c++ 
Cpp :: operand-- c++ 
Cpp :: cpp lambda function 
Cpp :: how to remove first element from vector c++ 
Cpp :: for loop in cpp 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =