it seems that my .h files arent being included

deleted code as my assignment as been submitted and i will be done for plagerism against myself (yes thats somehow possible lol
Last edited on
You cannot possibly receive appropriate help without showing the error messages. 176 errors? Just show the first 10 or so. Note, however, that several will mark in the same line so most likely one or two of each line is good.

You'll also have to post the code that pertains those lines.
One of those 176 will be a lack of an initialisation for currentAccNo in Account.cpp - something like:

Account.cpp:
int Account :: currentAccNo = 0;

Can't really speculate on the rest of the errors without more info, sorry X).

If headers really aren't being found, then you'll get (at the top) something like:

Account.cpp:1:20: fatal error: Account.h: No such file or directory


Otherwise, the code that you've posted so far doesn't look too bad. (^_^)d
A couple of additional observations:

Not sure if this is a typo, but you need a space between #include and "yourheader.h"

1
2
3
4
#include<iostream>
#include<vector>
#include"Transaction.h"
#include<string> 


Should be:

1
2
3
4
#include <iostream>
#include <vector>
#include "Transaction.h"
#include <string> 



It's also not good practice to use using namespace std; in header files. Instead, fully qualify your STL objects with std::

e.g.
std::vector<Transaction*> transList;

But as webJose said, post the errors. The first couple should give a clear indication of what's wrong.
Last edited on
I'm on my fone now, not my computer but most of the errors were for my other files saying that Account isn't a data type even tho I had used "#include"Account.h"
The most common error was c2143 (I think off the top of my head). It was basically saying that I was missing a comma or a semi colon in places but I've checked through it all and they were all in the right places
I smell a circular include.

If Account.h is including Transaction.h, then Transaction.h cannot include Account.h. If that's what you're doing then you'll have the errors you describe.

See this, specifically section 4 and up:

http://www.cplusplus.com/forum/articles/10627/
Here are my Errors:
1>------ Build started: Project: Assignment, Configuration: Debug Win32 ------
1>Build started 07/12/2011 13:21:12.
1>InitializeBuildStatus:
1>  Touching "Debug\Assignment.unsuccessfulbuild".
1>ClCompile:
1>  Transaction.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(22): error C2065: 'Transaction' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(22): error C2059: syntax error : '>'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(35): error C2065: 'a' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(35): error C2275: 'Account' : illegal use of this type as an expression
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(35): error C2143: syntax error : missing ',' before ')'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.h(36): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(9): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(11): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(12): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(15): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(18): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\object.h(19): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(6): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(12): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(15): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(16): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(9): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(15): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(18): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(20): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(22): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(10): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(13): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(10): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(13): error C2143: syntax error : missing ';' before '}'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(15): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(27): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(28): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(29): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(30): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(31): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(32): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(33): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(34): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(35): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(36): error C2143: syntax error : missing ';' before '{'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(41): error C2143: syntax error : missing ';' before '}'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(35): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2146: syntax error : missing ',' before identifier '_Buffer'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2065: '_Buffer' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2146: syntax error : missing ',' before identifier '_SizeInBytes'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2065: '_SizeInBytes' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2146: syntax error : missing ',' before identifier '_Index'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2065: '_Index' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(149): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(155): error C2146: syntax error : missing ',' before identifier '_Tm'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(155): error C2065: '_Tm' : undeclared identifier

1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(155): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2065: '_Size' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(157): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(160): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(160): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(160): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2065: '_Size' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(161): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(172): error C2146: syntax error : missing ',' before identifier '_Format'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(172): error C2065: '_Format' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(172): error C2146: syntax error : missing ',' before identifier '_Tm'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(172): error C2065: '_Tm' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(172): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2146: syntax error : missing ',' before identifier '_Format'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2065: '_Format' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2146: syntax error : missing ',' before identifier '_Tm'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2065: '_Tm' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2146: syntax error : missing ',' before identifier '_Locale'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2065: '_Locale' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(173): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(176): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(176): error C2065: '_Size' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(180): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(180): error C2065: '_Size' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(195): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(195): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(195): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2065: '_Size' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.h(196): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(83): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(84): error C2065: '_Time2' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(85): error C2143: syntax error : missing ';' before '}'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(87): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(92): error C2143: syntax error : missing ';' before '}'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(94): error C2146: syntax error : missing ',' before identifier '_Time'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(94): error C2065: '_Time' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(94): error C2143: syntax error : missing ',' before ')'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(95): error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\time.inl(95): fatal error C1003: error count exceeds 100; stopping compilation
1>  List.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(22): error C2146: syntax error : missing ';' before identifier 'accList'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(22): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\customer.h(22): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  JuniorAccount.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'acc' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(13): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2541: 'delete' : cannot delete objects that are not pointers
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(19): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  Driver.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'acc' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(13): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2541: 'delete' : cannot delete objects that are not pointers
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(19): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  Customer.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  CurrentAccount.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'acc' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(13): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2541: 'delete' : cannot delete objects that are not pointers
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(19): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  Account.cpp
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(10): error C2065: 'acc' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(13): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2065: 'info' : undeclared identifier
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\entry.h(14): error C2541: 'delete' : cannot delete objects that are not pointers
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\list.h(19): error C2061: syntax error : identifier 'Account'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\currentaccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\junioraccount.h(10): error C2504: 'Account' : base class undefined
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C2143: syntax error : missing ';' before '*'
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\transaction.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.81
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Although all the Time.h errors can be ignored as thats a library i have #included so i know that they are right
See my previous post. You're circular including. You can't do that.


Also you didn't need to make 3 posts of errors:

webJose wrote:
176 errors? Just show the first 10 or so.
I have just forward declared my transaction class and changed my Transaction constructor and that has taken me down to 3 errors and 1 warning.

Warning 1 warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. k:\university\year
2\semester 1\further programming concepts in c++\assignment\assignment\transaction.cpp 19

Error 2 error C2514: 'Transaction' : class has no constructors k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.cpp 22

Error 3 error C2027: use of undefined type 'Transaction' k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.cpp 23

Error 4 error C2227: left of '->tDeposit' must point to class/struct/union/generic type k:\university\year 2\semester 1\further programming concepts in c++\assignment\assignment\account.cpp 23
Warning 1 warning C4996: 'localtime': This function or variable may be unsafe.


This is some bogus warning VS throws at you. You can ignore it or you can #define _CRT_SECURE_NO_WARNINGS


The other errors can be solved by #including "transaction.h" in account.cpp (note: the cpp file, not the header file)
Thankyou, all of that has now been sorted but now im getting 2 more :

Error 1 error LNK2001: unresolved external symbol "private: static int Account::currentAccNo" (?currentAccNo@Account@@0HA) K:\University\Year 2\Semester 1\Further programming concepts in c++\Assignment\Assignment\Account.obj


Error 2 error LNK1120: 1 unresolved externals K:\University\Year 2\Semester 1\Further programming concepts in c++\Assignment\Assignment\Debug\Assignment.exe 1


Sorry to be a pain, i just dont have a clue when it comes to compiler errors, they tell u a lot about nothing if you dont particularly know what your looking at
Disch might be right. Show The top part of Transaction.cpp, the file being compiled first. We are interested in the #includes. If possible, show the Transaction.h file to see if the class depends on the Account class in any way.
code deletedf

I've sorted it now, it was a static int i was using which ive taken out so im now getting no errors or warnings thanks for all of your help. Im just struggling on how to make my constructor for Account give each account a unique account number now where each one accends, starting at 1 and going up to however many accounts i make
Last edited on
That is indeed what you need a static int for.

Please refer to my post above for the solution.
Topic archived. No new replies allowed.