comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
March 2008
motuwethfrsasuw
     12 9
3456789 10
10111213141516 11
17181920212223 12
24252627282930 13
31       14
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c++ Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  C++ byte         


Author: lazy
Date: Mar 31, 2008 23:01

Is there a datatype for byte?
I want to write an API that takes in an array of bytes.
I can use char array, but not sure if sizeof(char) will always be 1
now or in future on all machines(32/64bit) and compilers.
Is sizeof(char) always gauranteed to be one?

Thanks.
8 Comments
  Newbie VC++ 6.0 issues         


Author: w0rd
Date: Mar 31, 2008 21:56

Hi guys,
Wondering if you could help me with some errors I've been getting with
the source of a commissioned project. I've got no C++ experience so
I've got no idea what's going on but when I try to compile in debug
mode I get these errors (I've included the lines lines where the
errors happen if it helps):

addrinfo *AI;
\Async.cpp(47) : error C2065: 'addrinfo' : undeclared identifier
\Async.cpp(47) : error C2065: 'AI' : undeclared identifier
\Async.cpp(47) : warning C4552: '*' : operator has no effect; expected
operator with side-effect

if(getaddrinfo(lpszHost, "80", NULL, &AI) != 0)
\Async.cpp(50) : error C2065: 'getaddrinfo' : undeclared identifier

SOCKET s = socket(AI->ai_family, SOCK_STREAM, 0);
\Async.cpp(56) : error C2227: left of '->ai_family' must point to
class/struct/union
Show full article (1.79Kb)
11 Comments
  strange error message         


Author: aaragon
Date: Mar 31, 2008 21:51

Hi everyone,

Can someone explain me the weird error message that I got from this
simple code?

struct VTKP {
std::ostream& os_;
VTKP(std::ostream& os) : os_(os) {}
void operator()(int i) {
os_< }
};

int main(int argc, char *argv[]) {
Show full article (0.91Kb)
3 Comments
  Cheap Patek Philippe Golden Ellipse Watches Replica - Patek Philippe Watches Wholesale         


Author: sales017
Date: Mar 31, 2008 21:28

Cheap Patek Philippe Golden Ellipse Watches Replica - Patek Philippe
Watches Wholesale

AAA Replica Watches : http://www.watches-replicas.com
Patek Philippe Watches Brands : http://www.watches-replicas.com/patek-philippe-watches.html
Replica Patek Philippe Golden Ellipse Watches :
http://www.watches-replicas.com/patek-philippe-golden-ellipse-watches.html

China largest replica watches wholesaler, wholesale up to 80%% of Patek
Philippe Golden Ellipse Replica Watches and Patek Philippe Golden
Ellipse Fake Watch. The most famous Swiss brand name watches you can
find, replica Patek Philippe Golden Ellipse Watches and fake Patek
Philippe Golden Ellipse Watches are also available. All our Patek
Philippe Golden Ellipse Watches replicas are crafted in high quality,
You will get great profite by ordering our good cheap watches.

Patek Philippe Golden Ellipse Watches All Products :

Patek Philippe Golden Ellipse 18kt Rose Gold Chocolate Mens Watch
3738-100R :
http://www.watches-replicas.com/Patek-3738-100R-3625.html
Show full article (2.23Kb)
no comments
  Cheap Swatch Skin Watches Replica - Swatch Watches Wholesale         


Author: sales017
Date: Mar 31, 2008 21:28

Cheap Swatch Skin Watches Replica - Swatch Watches Wholesale

AAA Replica Watches : http://www.watches-replicas.com
Swatch Watches Brands : http://www.watches-replicas.com/swatch-watches.html
Replica Swatch Skin Watches : http://www.watches-replicas.com/swatch-skin-watches.html

China largest replica watches wholesaler, wholesale up to 80%% of
Swatch Skin Replica Watches and Swatch Skin Fake Watch. The most
famous Swiss brand name watches you can find, replica Swatch Skin
Watches and fake Swatch Skin Watches are also available. All our
Swatch Skin Watches replicas are crafted in high quality, You will get
great profite by ordering our good cheap watches.

Swatch Skin Watches All Products :

Swatch Baroque Eyes Unisex Watch SFK281G :
http://www.watches-replicas.com/swatch-baroque-eyes-watch-SFK281G-6671.html

Swatch Pasteloop Unisex Watch SFK231 :
http://www.watches-replicas.com/swatch-pasteloop-watch-SFK231-6672.html

Swatch Her Dignity Watch SFK277G :
http://www.watches-replicas.com/Swatch-SFK277G-6673.html

Swatch Golden Leak Unisex Watch SFK274 :
http://www.watches-replicas.com/Swatch-Golden-Leak-Unisex-Watch-SFK274-6674.html
Show full article (4.46Kb)
no comments
  Cheap Invicta Baby Lupah Watches Replica - Invicta Watches Wholesale         


Author: sales017
Date: Mar 31, 2008 21:28

Cheap Invicta Baby Lupah Watches Replica - Invicta Watches Wholesale

AAA Replica Watches : http://www.watches-replicas.com
Invicta Watches Brands : http://www.watches-replicas.com/invicta-watches.html
Replica Invicta Baby Lupah Watches : http://www.watches-replicas.com/invicta-baby-lupah-watches.html

China largest replica watches wholesaler, wholesale up to 80%% of
Invicta Baby Lupah Replica Watches and Invicta Baby Lupah Fake Watch.
The most famous Swiss brand name watches you can find, replica Invicta
Baby Lupah Watches and fake Invicta Baby Lupah Watches are also
available. All our Invicta Baby Lupah Watches replicas are crafted in
high quality, You will get great profite by ordering our good cheap
watches.

Invicta Baby Lupah Watches All Products :

Invicta Baby Lupah Ladies Watch ZW2003 :
http://www.watches-replicas.com/invicta-baby-lupah-ladies-watch-zw2003-5406.html

Invicta Baby Lupah Ladies Watch ZW2683 :
http://www.watches-replicas.com/invicta-baby-lupah-ladies-watch-zw2683-5407.html

Invicta Baby Lupah Ladies Watch ZW2009 :
http://www.watches-replicas.com/invicta-baby-lupah-ladies-watch-zw2009-5408.html
Show full article (5.50Kb)
no comments
  Cheap Rado Ceramica Watches Replica - Rado Watches Wholesale         


Author: sales017
Date: Mar 31, 2008 21:28

Cheap Rado Ceramica Watches Replica - Rado Watches Wholesale

AAA Replica Watches : http://www.watches-replicas.com
Rado Watches Brands : http://www.watches-replicas.com/rado-watches.html
Replica Rado Ceramica Watches : http://www.watches-replicas.com/rado-ceramica-watches.html

China largest replica watches wholesaler, wholesale up to 80%% of Rado
Ceramica Replica Watches and Rado Ceramica Fake Watch. The most famous
Swiss brand name watches you can find, replica Rado Ceramica Watches
and fake Rado Ceramica Watches are also available. All our Rado
Ceramica Watches replicas are crafted in high quality, You will get
great profite by ordering our good cheap watches.

Rado Ceramica Watches All Products :

Rado Sintra Platinum-tone Ceramic Blue Mens Watch R13432212 :
http://www.watches-replicas.com/Rado-Mens-Watch-R13432212-3718.html

Rado Ceramica Black Ceramic Ladies Watch R21540202 :
http://www.watches-replicas.com/Rado-Ceramica-Ladies-Watch-R21540202-3719.html

Rado Ceramica Mens Watch R21537712 :
http://www.watches-replicas.com/rado-R21537712-3720.html
Show full article (4.39Kb)
no comments
  conversion problem int <-> double ?         


Author: Markus Dehmann
Date: Mar 31, 2008 19:04

I have two integers i1 and i2, the second of which is guaranteed to be
between 0 and 99, and I encode them into one double:

double encoded = (double)i1 + (double)i2 / (double)100;

So, for example, 324 and 2 become 324.02. Now I want to decode them
using the function given below but it decodes the example as 324 and
1, instead of 324 and 2.

Can anyone tell me what's wrong and how to do this right? (my code see
below)

Thanks!
Markus

#include

void decode(double n, int& i1, int& i2){
i1 = int(n);
double rest = n - int(n);
i2 = int(rest * 100.0); // i2 is 1, should be
2
}
Show full article (0.80Kb)
6 Comments
  Help add commas to int on console output         


Author: yogi_bear_79
Date: Mar 31, 2008 18:15

I am passing a whole number integer to this function, it converts the
integer to a string, then I want to add commas so a number like
1234567 shows as 1,234,567. I am a little stuck, I belive the loop is
reading the string from right to left which led me to try decrementing
the loop, but a number like 12345 shows up like 123,45. Or is there a
better way all together to achive ths.

string toStr(int &i)
{
std::string s;
std::stringstream out;
out << i;
s = out.str();
for(size_t x = s.size(); x > 0;
--){
if(x != s.size() && x%%3 == 0)
s.insert(x,",");
}
return s;
}
18 Comments
  mesothelioma cancer treatment         


Author: reshma
Date: Mar 31, 2008 11:03

no comments
 
1 2 3 4 5 6 7 8 9