I just signed in to these forums and I'd be so happy if you guys could help me out with a triviality that I can't seem to get around.

Now, although I haven't actually got around to programming anything really complex, I've been reading alot these last 2 months and I wanted to start a project that'd be a challenge.

I got the main() ready and ofcourse it won't compile if I don't declare any of the three funtions in it, which are the only errors.

I tried declaring one of them in a header file but since it's a function that's supposed to return bitsets and has a vector class in one parameter and another bitset in the other I get all these errors and I can't get it to work.

The header file with the function declaration is this:

#include <string>
#include <bitset>
#include <vector>
#include <iostream>


bitset Read(vector v, bitset b);

The error I get is "`bitset' does not name a type ".

Could someone please help me out with this?

tux4life commented: Code tags on first post, I'm happy to see that :) +9

The error I get is "`bitset' does not name a type ".
Could someone please help me out with this?

I think you've forgot something, check out this :)
(You forgot specifying the number of bits)

but if I do specify the number of bits, I get another error that says "expected constructor, destructor, or type conversion before '<' token " and "expected `,' or `;' before '<' token". I shouldn't have to specify them though, I should be able to declare the type without giving specific parameters to the class.

Also: bitset is part of the std namespace, so it's std::bitset

commented: Haha, yes! +9

Oooooooh, so that's what I was missing.

I have a couple more errors but I'll try to sort them out by myself, it's just that that one was really getting to me. Thanks guys! : D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.