Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   can anyone help me with this code... (http://www.go4expert.com/forums/help-code-t10004/)

sankari 14Apr2008 11:56

can anyone help me with this code...
 
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;
 }



All times are GMT +5.5. The time now is 22:34.