Hi guys,
I'm getting an error i cannot figure. Here is my code
Header file
-------------------------------------------------------------------------------------------
I get this error at compilation - Clock.h:24: error: ISO C++ forbids declaration of ‘vector’ with no type
-
Clock.h:24: error: expected ‘;’ before ‘<’ token
-
Clock.h:27: error: ‘vector’ has not been declared
-
Clock.h:27: error: expected ‘,’ or ‘...’ before ‘<’ token
-
Clock.h:36: error: ‘list’ has not been declared
-
Clock.h:36: error: expected ‘,’ or ‘...’ before ‘<’ token
-
Clock.cpp:34: error: expected constructor, destructor, or type conversion before ‘<’ token
Any help would be appreciated,
Thanks
2 3100
Never mind guys, i figured it out...AFTER a couple of hrs!!
RRick 463
Recognized Expert Contributor
Hhhmmm, did you forget the std:: before vector? I have been burned too many times with that error.
One way around that problem is to add the following after your STL headers. Now you can write "vector" instead of "std::vecto r". -
#include <vector>
-
#include <list>
-
using namespace std;
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Boris |
last post by:
The .NET documentation talks about blittable and non-blittable types. While
objects of type System::Object* are non-blittable it doesn't say anything
about objects of user-defined classes. All the COM interop examples I've
seen always return objects of types of the System namespace. But what if you
want to return an object of a user-defined managed class?
public __gc class A {
public:
int i;
A(int value) : i(value) { }
|
by: Antony |
last post by:
When I declared a constant in a class like:
public Const attr As ClassB = nothing
(ClassB is the user-defined Class)
I get the compiler error: Constants must be an intrinsic or enumerated type,
not a class, structure, or array type.
So how can I declare a constant value of type ClassB in this case? Thanks!
|
by: Vilem Sova |
last post by:
I want to use a user-defined object in the 'Add' method to add items to a
combo box. The help documentation says that if you use an object in the add
method then the object's 'ToString' method is used to obtain the string to
display in the combo box.
I've added a public property "ToString" to my object that contains the
required text to display, but it is not being called to get the required
text. The text that is appearing in the combo...
|
by: Dave |
last post by:
Is there a way to put some comments in my class designs that will show up in
the IDE intellisense so I can add some information about the parameters to
be passed to member methods?
Thanks in advance for the help.
Dave
|
by: FishVal |
last post by:
Hereby I'm proposing a way of convinient work with properties containing SQL Select statements, particulary RowSource property of ComboBox and ListBox.
The usual way is the following.
Private Sub Combo1_AfterUpdate()
Me.Combo2.RowSource = "SELECT ... FROM ... WHERE Table2.keyID=" & Me.Combo1 & ";"
Combo2.Requery
| |
by: rolan |
last post by:
I am trying to figure out how to store and access an array, which is created inside a function, and needs to be accessed outside the function.
My user defined class has set and get functions for 2 values, "value" and "pseudoAddress".
"matrix" is of the user-defined class,
"*address" is a pointer to the user-defined class
I want *address to store the value of matrix, then I want *address to increment by the size of the UD-Class.
|
by: Ed |
last post by:
Hi, guys,
A big rock blocks my way.
I know that to put a user defined class with copy constructor,
override operator method, etc, can not be placed into Union. But I
have to.
I am refactoring an old system with template feature. If there is no
way, that means I had to pay additional work to re-implementation.
|
by: Billiska |
last post by:
Well, I ask this question because I'm rather familiar with C++ than VB.
I've just tried to create a class in VBA and found that I have to write some certain lines every time I want to create a new instance of the class.
So, isn't there a way to create a autorun subroutine for initializing a user-defined class?, like "constructor" in C++.
Thanks
|
by: nuffnough |
last post by:
I have defined two classes with one common field (called code) and
several different fields.
In class A there is only one instance of any given code as all items
are individual.
In class B, there may be none, one or many instances of each code, as
there can be any number of Bs referring to a single A.
I need to make a list of Bs, remove dupes, and then create a list of
As that have Bs.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |