Home > expected class > error expected either a definition for a tag name

Error Expected Either A Definition For A Tag Name

Contents

basic information about a student and their test grades. I need to have the user determine invalid use of incomplete type c++ the number of structures to be defined. I know I need to

Undefined Reference To Vtable

use pointers, but I'm not sure how exactly to go about doing this. I know how to use c++ inheritance example pointers to dynamically allocate an array, and have the user determine the amount of elements in the array. However, I keep running into errors when I try to use https://developer.mbed.org/questions/5322/compile-errors/ an array of structs. Any help would be appreciated, thank you. Mar 25, 2011 at 10:42pm UTC hanst99 (2869) Hm? There is 0 difference whether you use a struct or an inbuilt datatype. What exactly did you write, and what errors do you get? Mar 25, 2011 at 11:30pm UTC Rosto (4) 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
void getValues(struct *&iPtr) int numStudents; http://www.cplusplus.com/forum/general/39374/ struct student{ char firstName[20]; char lastName[20]; int grades[4]; double average; } *iPtr int main(){ getValues(iPtr); system("PAUSE"); } void getValues(student *&iPtr){ iPtr = new struct[numValues]; for(int i=0; i> iPtr[i].firstName; } } I'm getting an error on the function header at *&iPtr that says "expected either a definition or a tag name" Mar 25, 2011 at 11:46pm UTC hanst99 (2869) struct *&iPtr - no datatype there. Mar 26, 2011 at 12:54am UTC Rosto (4) what do I put? Mar 26, 2011 at 1:17am UTC closed account (D80DSL3A) Line 1:void getValues(student *&iPtr) but move it to after line 10 else the compiler won't know what a student is yet. Also, line 19 - where does numValues come from? Mar 26, 2011 at 2:00am UTC Rosto (4) Sorry about line 19, that was a mistake. Okay, I moved it and now I have no errors. Now I have this: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
int numStudents; struct student{ char firstName[20]; char lastName[20]; int grades[4]; double average; } *iPtr; void getValues(student *&iPtr); int main(){ getValues(iPtr); system("PAUSE"); } void getValues(student *&i

 

Related content

c# error 2 expected class delegate enum interface or struct

C Error Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Delegate Enum Interface Or Struct Void a li li a href How To Solve Expected Class Delegate Enum Interface Or Struct a li li a href Error Type Or Namespace Definition Or End-of-file Expected a li ul td tr tbody table p here for relatedl a quick overview of the site Help error expected class delegate enum interface or struct Center Detailed answers to any questions you might have Meta expected class delegate enum

c# error cs1518 expected class delegate enum interface or struct

C Error Cs Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href How To Solve Expected Class Delegate Enum Interface Or Struct a li li a href Error Type Or Namespace Definition Or End Of File Expected a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you relatedl might have Meta Discuss the workings and policies of error expected class delegate enum interface or struct c this site About Us Learn more about

compiler error message cs1518

Compiler Error Message Cs table id toc tbody tr td div id toctitle Contents div ul li a href C Cs a li li a href Expected Class Delegate Enum Interface Or Struct C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the workings p h id C Cs p and policies of this site About Us Learn more about Stack Overflow error cs expected class delegate enum interface or struct the company Business Learn more about hiring developers

error 1 expected class delegate enum interface or struct

Error Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Delegate Enum Interface Or Struct In Mvc a li li a href Expected Class Delegate Enum Interface Or Struct cs a li li a href How To Solve Expected Class Delegate Enum Interface Or Struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn relatedl more

error 2 expected class delegate enum interface or struct

Error Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href List Expected Class Delegate Enum Interface Or Struct a li li a href Expected Class Delegate Enum Interface Or Struct cs a li li a href Type Or Namespace Definition Or End-of-file Expected a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the

error conversion to inaccessible base class is not allowed

Error Conversion To Inaccessible Base Class Is Not Allowed table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Name Before Token Inheritance a li li a href Can Protected Class Be Inherited a li li a href C Public Inheritance Private Members a li li a href C Public Vs Private Vs Protected a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and expected class member or base class name

error cs1518 expected class

Error Cs Expected Class p here for a quick overview of the site Help Center Detailed answers to any questions you relatedl might have Meta Discuss the workings and policies of expected class delegate enum interface or struct c this site About Us Learn more about Stack Overflow the company Business Learn cs error more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a

error cs1518 expected class delegate enum interface or struct

Error Cs Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Delegate Enum Interface Or Struct Void a li li a href Expected Class Delegate Enum Interface Or Struct In Mvc a li li a href Error Type Or Namespace Definition Or End Of File Expected a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings relatedl and policies of this site About Us Learn

expected class delegate enum interface or struct error

Expected Class Delegate Enum Interface Or Struct Error table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Delegate Enum Interface Or Struct Void a li li a href How To Solve Expected Class Delegate Enum Interface Or Struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more expected class delegate enum interface or struct in mvc about Stack Overflow the company

inline script error expected class delegate enum interface or struct

Inline Script Error Expected Class Delegate Enum Interface Or Struct table id toc tbody tr td div id toctitle Contents div ul li a href Expected Class Delegate Enum Interface Or Struct In Mvc a li li a href Cs Expected Class Delegate Enum Interface Or Struct a li li a href Identifier Expected C a li li a href C Enum a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta expected class delegate enum interface or struct void Discuss the