Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 16:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



expression must have integral or enum type

Discussion on expression must have integral or enum type within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
expression must have integral or enum type

PHP Code:
void info(SOCKET *accettastd::string idint client) {

    
    
std::string info EncryptGamePacket("req_info" "1" id);
    for (
int i 0<= utentii++)  send(accetta[i], info.c_str(), info.size(),0);
    


Someone know why i get error : expression must have integral or enum type ?

Here : "1"
szymek111 is offline  
Old 03/16/2014, 16:36   #2
 
Padmak's Avatar
 
elite*gold: 58
Join Date: Jun 2008
Posts: 2,311
Received Thanks: 8,420
You cannot add two char*, wrap "req_info" or "1" in a new std::string

Padmak
Padmak is offline  
Thanks
1 User
Old 03/16/2014, 16:44   #3
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Then what i can do ? xd
szymek111 is offline  
Old 03/16/2014, 16:50   #4

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
Quote:
wrap "req_info" or "1" in a new std::string
Padmak gave you the answer.
Code:
std::string("req_info") + std::string("1") + id
You could write "req_info1" as well, I don't see the point in concatenating 2 constant strings..
snow is offline  
Thanks
1 User
Old 03/16/2014, 16:59   #5
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Quote:
Originally Posted by snow911 View Post
Padmak gave you the answer.
Code:
std::string("req_info") + std::string("1") + id
You could write "req_info1" as well, I don't see the point in concatenating 2 constant strings..
Ok . Mod can now close this thread . Thanks for help.
szymek111 is offline  
Old 03/16/2014, 19:58   #6


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
#closed
MrSm!th is offline  
Closed Thread


Similar Threads Similar Threads
[QUEST] Regular Expression
10/17/2013 - Metin2 Private Server - 2 Replies
Hi guys, I want do this regex strings. Function name is string.match() from Lua. I want use to my quest. How do we do? Thank you.. Good works.. Edit:
C++ - Enum C2011 Error
02/22/2013 - C/C++ - 4 Replies
Hi, Ich wollte in C++ eine Enum in einer Headerdatei auslagern, aber wenn ich es Compilieren möchte erhalte ich nur: error C2011:'Punkte':'enum'Typneudefinition meine Enum sieht wie folgt aus: enum Punkte{ BONUSPUNKTE = 35, FULLHOUSEPUNKTE = 25,
Microsoft Expression Web 4
01/07/2011 - General Art - 4 Replies
Guten Tag, Also ich habe ein Problem mit der oben genannten Software. Heute ist endlich das Paket eingetroffen, und ich habe es wunderbar installiert. Nur leider funktioniert 1 Programm nicht. Microsoft Expression Web 4 Beim öffnen kommt eine Fehlermeldung, danach sucht es nach einer Lösung. Im Anhang befindet sich das Bild zum genannten Problem.
[L2OFF Final Gracia] L2 Integral , Fresh opened at 03, November 2009!!!
11/05/2009 - Lineage 2 - 0 Replies
Hello all, here is a brand new server opening. After 4 months working on Integral , we are happy to say that we are finished all the work needed for a Completed low rate Lineage2 Server. We are ready to announce you the official server starting date: On Tuesday, 03 November, 2009 Integral is going live ! 1st GameSites200 Advertisement http://i35.tinypic.com/3495j69.gif
[HELP] public enum
10/24/2009 - CO2 Private Server - 5 Replies
anyone here can help this? public enum UpdateID : uint { None = 0xFFFFFFFF, Hitpoints = 0, MaxHitpoints = 1, Mana = 2, MaxMana = 3, Money = 4, Experience = 5,



All times are GMT +1. The time now is 16:18.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.