this is just the begining of a small project. i'm trying to get name and marks of a student usign struct.
Code:
#include <iostream>
#include <stream>
#include <sstream>
using namespace std;


struct progress_report
{
   string names;
   float mark;
} student;
   
  
  
  
getnam (string nam,float score)
{
  string nam;
  float score;
  
  cin >> "Enter your name";
  getline(cin,nam);
  progress_report.names=nam;
  cin >>"Enter your mark";
  getline(cin,score);
  progress_report.mark=score;
  return (progress_report.names,progress_report.mark);
}
 
  
int main()

{
  string n;
  float mk;
  getnam(n,mk);
  
  cout << "name is " << n;
  cout << "mark is " << mk;
  return 0;
 }

Last edited by shabbir; 14Apr2008 at 12:32.. Reason: Code block