5 Replies - 38519 Views - Last Post: 16 August 2005 - 08:53 AM Rate Topic: -----

#1 sekanthorus   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-August 05

type name expected error

Posted 15 August 2005 - 07:14 AM

hi, i am still a new player in C++ :D and have not much talent for it but i am taking it as my college studies.... and when i am doing my coursework in the examination hall , i had encountered and error which says "type name expected". becoz it is my coursework therefore i could not show my code here.... i hope anyone can tell me what are the possible cause for this error. ????

thanks... : :D

Is This A Good Question/Topic? 0
  • +

Replies To: type name expected error

#2 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 253
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: type name expected error

Posted 15 August 2005 - 07:18 AM

That error is usually thrown when a variable or object's type has not been specified...without seeing the code, I caould not tell you which one...
Was This Post Helpful? 0
  • +
  • -

#3 sekanthorus   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-August 05

Re: type name expected error

Posted 15 August 2005 - 07:26 AM

do you have any example to explain for me..?? ^^
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 253
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: type name expected error

Posted 15 August 2005 - 07:40 AM

Well, a simple example might be in the section where you are declaring variables:
int number1 = 0; //this is correct
number2 = 0;//the type has not been specified


Of course, it could be anything in the program. I assume the error message also comes with a line number where the error occurs. If possible, you may wish to identify this line, and post that particular line of code here.
Was This Post Helpful? 0
  • +
  • -

#5 sekanthorus   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-August 05

Re: type name expected error

Posted 15 August 2005 - 07:48 AM

ok i try to decipher the bugged program and let you have a look??
btw, whats the mutliple redeclaration of func(int, char*) in void main;
Was This Post Helpful? 0
  • +
  • -

#6 sekanthorus   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-August 05

Re: type name expected error

Posted 16 August 2005 - 08:53 AM

this is my program, pls help me debugg......

C:\Borland\bcc55\Bin\bcc32.exe cq2.cpp

Borland C++ 5.5 for Win32 Copyright © 1993, 2000 Borland
cq2.cpp:
Warning W8060 cq2.cpp 132: Possibly incorrect assignment in function compute_fm(stud *,int)
Warning W8060 cq2.cpp 132: Possibly incorrect assignment in function compute_fm(stud *,int)
Error E2062 cq2.cpp 214: Invalid indirection in function compute_am(stud *,int)
Error E2062 cq2.cpp 218: Invalid indirection in function compute_am(stud *,int)
Error E2062 cq2.cpp 222: Invalid indirection in function compute_am(stud *,int)
Error E2062 cq2.cpp 226: Invalid indirection in function compute_am(stud *,int)
*** 4 errors in Compile ***

Attached File(s)

  • Attached File  cq2.cpp (6.65K)
    Number of downloads: 3

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1