小编eag*_*mer的帖子

尝试将变量值分配给Struct元素.第一个变量有正确的值,但struct元素有垃圾值

//Program tracks 10 students
//Prompts for first and last names
//Collect 4 grades from each student: final exam, 2 quizzes, and class project
//Report will display names w/ individual scores, class average, and highest grade

//Each students individual grade will be calculated with grade weights
/*Grade Weights
-2 Quizzes @ 15% each
-1 Final Exam @ 20% 
-1 Class Project @ 50% 
*/

#include<iostream>
using namespace std;

int main()
{
    struct goodStudent
    { 
        string fname;
        string lname;
        double exam;
        double …
Run Code Online (Sandbox Code Playgroud)

c++ variables struct variable-assignment

0
推荐指数
1
解决办法
412
查看次数

标签 统计

c++ ×1

struct ×1

variable-assignment ×1

variables ×1