Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bitmap functions related question

Status
Not open for further replies.

asja

Technical User
Nov 6, 2008
3
BA
Hi,
I am new to this forum and to Borland c++ Builder (I used to work in Visual Basic). I switched to c++ because of the speed of execution.

At present I am studying bitmaps and bit manipulation functions.

What puzzles me is that the code related to test() function works, for example:

Code:
bitset<8> myset (string("11100001"));
if (myset.test(0))
  Memo1->Text="Yes";

But the code related to count() function gives me a Linker Error, and won't start the program:

Code:
bitset<8> myset (string("11110011"));
if (myset.count()>2)
  Memo1->Text="Yes";

The included files are:
Code:
#include <vcl.h>
#pragma hdrstop
#include <iostream>
#include <string>
#include <bitset>
using namespace std;

I know that I miss something here, although I followed the Builder Help.

thanks
 
I must admit, I've never used bitmaps. Just looking over the help files, I notice that count() required a pointer (*this). I don't know if that will help or not.


James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top