|
You last visited: Today at 16:18
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.
03/16/2014, 16:24
|
#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 *accetta, std::string id, int client) {
std::string info = EncryptGamePacket("req_info" + "1" + id); for (int i = 0; i <= utenti; i++) send(accetta[i], info.c_str(), info.size(),0);
}
Someone know why i get error : expression must have integral or enum type ?
Here : "1"
|
|
|
03/16/2014, 16:36
|
#2
|
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
|
|
|
03/16/2014, 16:44
|
#3
|
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
|
Then what i can do ? xd
|
|
|
03/16/2014, 16:50
|
#4
|
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..
|
|
|
03/16/2014, 16:59
|
#5
|
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
|
Quote:
Originally Posted by snow911
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.
|
|
|
03/16/2014, 19:58
|
#6
|
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
|
#closed
|
|
|
 |
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.
|
|