<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Habe Problem mit Source Code]]></title><description><![CDATA[<p>Guten Tag,</p>
<p>Ich habe kaum c++ Kentnisse, darum frage ich hier nach hilfe.<br />
Ich bin rad dabei mir hilfe eines Buches und einem C++ Kurs diese Sprache zuerlernen. ABer ich hänge schon bei ganz einfachen deklarationen^^.<br />
Ihr ist einmal der ausschnitt wo der fehler sein soll:</p>
<p>void MySQL::getString(char* table, char* whr, char* wht, char* value, char* string){<br />
setLastAccess(GetTickCount());<br />
MYSQL_RES *mres;<br />
MYSQL_ROW mrow;<br />
char query[255];<br />
sprintf_s(query, 255, &quot;select %s from %s where %s='%s';&quot;,value, table, whr, wht);<br />
mysql_real_query(&amp;maple_db, query, strlen(query));<br />
mres = mysql_use_result(&amp;MySQL::maple_db);<br />
if (mres==NULL)<br />
return;<br />
mrow = mysql_fetch_row(mres);<br />
if (mrow==NULL)<br />
return;</p>
<p>strcpy(string,(char*)mrow[0]);<br />
mysql_free_result(mres);<br />
}<br />
bool MySQL::getStringI(char* table, char* whr, int wht, char* value, char* string){<br />
setLastAccess(GetTickCount());<br />
MYSQL_RES <em>mres;<br />
MYSQL_ROW mrow;<br />
char query[255];<br />
sprintf_s(query, 255, &quot;select %s from %s where %s='%d';&quot;,value, table, whr, wht);<br />
mysql_real_query(&amp;maple_db, query, strlen(query));<br />
mres = mysql_use_result(&amp;MySQL::maple_db);<br />
if (mres==NULL)<br />
return false;<br />
mrow = mysql_fetch_row(mres);<br />
if (mrow==NULL)<br />
return false;<br />
strcpy(string,(char</em>)mrow[0]);<br />
mysql_free_result(mres);<br />
return true;<br />
}</p>
<p>Und der Fehler bericht ist das:</p>
<p>1&gt;------ Erstellen gestartet: Projekt: LoginServer, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;FlyFFServer.cpp<br />
1&gt;Characters.cpp<br />
1&gt;Items.cpp<br />
1&gt;log.cpp<br />
1&gt;Login.cpp<br />
1&gt;Player.cpp<br />
1&gt;Server.cpp<br />
1&gt;Worlds.cpp<br />
1&gt;MySQLM.cpp<br />
1&gt;g:\flyff\source\common\database\mysqlm.cpp(138) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1&gt; d:\program files\microsoft visual studio 9.0\vc\include\string.h(74): Siehe Deklaration von 'strcpy'<br />
1&gt;g:\flyff\source\common\database\mysqlm.cpp(154) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1&gt; d:\program files\microsoft visual studio 9.0\vc\include\string.h(74): Siehe Deklaration von 'strcpy'<br />
1&gt;LoginPacket.cpp<br />
1&gt;PacketCreator.cpp<br />
1&gt;Initializing.cpp<br />
1&gt;tinystr.cpp<br />
1&gt;tinyxml.cpp<br />
1&gt;tinyxmlerror.cpp<br />
1&gt;tinyxmlparser.cpp<br />
1&gt;Code wird generiert...<br />
1&gt;Manifest in Ressourcen wird kompiliert...<br />
1&gt;Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0<br />
1&gt;Copyright (C) Microsoft Corporation. All rights reserved.<br />
1&gt;Verknüpfen...<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Selector::~Selector(void)&quot; (??1Selector@@QAE@XZ)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Acceptor::Acceptor(int,class Selector *,class AbstractPlayerFactory *)&quot; (??0Acceptor@@QAE@HPAVSelector@@PAVAbstractPlayerFactory@@@Z)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Selector::Selector(void)&quot; (??0Selector@@QAE@XZ)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;PacketCreator.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: void __thiscall PacketHandler::sendPacket(unsigned char *,int)&quot; (?sendPacket@PacketHandler@@QAEXPAEH@Z)&quot; in Funktion &quot;&quot;public: void __thiscall Player::sendPacket(unsigned char *,int)&quot; (?sendPacket@Player@@QAEXPAEH@Z)&quot;.<br />
1&gt;C:\kims\LoginServer.exe : fatal error LNK1120: 4 nicht aufgelöste externe Verweise.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://g:\Flyff\Source\LoginServer\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;LoginServer - 5 Fehler, 2 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Kann mir ihr einer bitte weiter helfen wie ich das strcpy richtig deklariere?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/228534/habe-problem-mit-source-code</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 11:45:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228534.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Nov 2008 16:18:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Habe Problem mit Source Code on Sat, 29 Nov 2008 16:20:06 GMT]]></title><description><![CDATA[<p>Guten Tag,</p>
<p>Ich habe kaum c++ Kentnisse, darum frage ich hier nach hilfe.<br />
Ich bin rad dabei mir hilfe eines Buches und einem C++ Kurs diese Sprache zuerlernen. ABer ich hänge schon bei ganz einfachen deklarationen^^.<br />
Ihr ist einmal der ausschnitt wo der fehler sein soll:</p>
<p>void MySQL::getString(char* table, char* whr, char* wht, char* value, char* string){<br />
setLastAccess(GetTickCount());<br />
MYSQL_RES *mres;<br />
MYSQL_ROW mrow;<br />
char query[255];<br />
sprintf_s(query, 255, &quot;select %s from %s where %s='%s';&quot;,value, table, whr, wht);<br />
mysql_real_query(&amp;maple_db, query, strlen(query));<br />
mres = mysql_use_result(&amp;MySQL::maple_db);<br />
if (mres==NULL)<br />
return;<br />
mrow = mysql_fetch_row(mres);<br />
if (mrow==NULL)<br />
return;</p>
<p>strcpy(string,(char*)mrow[0]);<br />
mysql_free_result(mres);<br />
}<br />
bool MySQL::getStringI(char* table, char* whr, int wht, char* value, char* string){<br />
setLastAccess(GetTickCount());<br />
MYSQL_RES <em>mres;<br />
MYSQL_ROW mrow;<br />
char query[255];<br />
sprintf_s(query, 255, &quot;select %s from %s where %s='%d';&quot;,value, table, whr, wht);<br />
mysql_real_query(&amp;maple_db, query, strlen(query));<br />
mres = mysql_use_result(&amp;MySQL::maple_db);<br />
if (mres==NULL)<br />
return false;<br />
mrow = mysql_fetch_row(mres);<br />
if (mrow==NULL)<br />
return false;<br />
strcpy(string,(char</em>)mrow[0]);<br />
mysql_free_result(mres);<br />
return true;<br />
}</p>
<p>Und der Fehler bericht ist das:</p>
<p>1&gt;------ Erstellen gestartet: Projekt: LoginServer, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;FlyFFServer.cpp<br />
1&gt;Characters.cpp<br />
1&gt;Items.cpp<br />
1&gt;log.cpp<br />
1&gt;Login.cpp<br />
1&gt;Player.cpp<br />
1&gt;Server.cpp<br />
1&gt;Worlds.cpp<br />
1&gt;MySQLM.cpp<br />
1&gt;g:\flyff\source\common\database\mysqlm.cpp(138) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1&gt; d:\program files\microsoft visual studio 9.0\vc\include\string.h(74): Siehe Deklaration von 'strcpy'<br />
1&gt;g:\flyff\source\common\database\mysqlm.cpp(154) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.<br />
1&gt; d:\program files\microsoft visual studio 9.0\vc\include\string.h(74): Siehe Deklaration von 'strcpy'<br />
1&gt;LoginPacket.cpp<br />
1&gt;PacketCreator.cpp<br />
1&gt;Initializing.cpp<br />
1&gt;tinystr.cpp<br />
1&gt;tinyxml.cpp<br />
1&gt;tinyxmlerror.cpp<br />
1&gt;tinyxmlparser.cpp<br />
1&gt;Code wird generiert...<br />
1&gt;Manifest in Ressourcen wird kompiliert...<br />
1&gt;Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0<br />
1&gt;Copyright (C) Microsoft Corporation. All rights reserved.<br />
1&gt;Verknüpfen...<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Selector::~Selector(void)&quot; (??1Selector@@QAE@XZ)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Acceptor::Acceptor(int,class Selector *,class AbstractPlayerFactory *)&quot; (??0Acceptor@@QAE@HPAVSelector@@PAVAbstractPlayerFactory@@@Z)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;FlyFFServer.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall Selector::Selector(void)&quot; (??0Selector@@QAE@XZ)&quot; in Funktion &quot;_main&quot;.<br />
1&gt;PacketCreator.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: void __thiscall PacketHandler::sendPacket(unsigned char *,int)&quot; (?sendPacket@PacketHandler@@QAEXPAEH@Z)&quot; in Funktion &quot;&quot;public: void __thiscall Player::sendPacket(unsigned char *,int)&quot; (?sendPacket@Player@@QAEXPAEH@Z)&quot;.<br />
1&gt;C:\kims\LoginServer.exe : fatal error LNK1120: 4 nicht aufgelöste externe Verweise.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://g:\Flyff\Source\LoginServer\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;LoginServer - 5 Fehler, 2 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Kann mir ihr einer bitte weiter helfen wie ich das strcpy richtig deklariere?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1622963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1622963</guid><dc:creator><![CDATA[kehrenkamp]]></dc:creator><pubDate>Sat, 29 Nov 2008 16:20:06 GMT</pubDate></item><item><title><![CDATA[Reply to Habe Problem mit Source Code on Sat, 29 Nov 2008 16:24:07 GMT]]></title><description><![CDATA[<p>erstmal C/C++ Tags, pls.<br />
Der Code sieht aber nicht aus wie C++.<br />
Jedenfalls, das strcpy sind nur Warnungen, außerdem deklarierst dus nicht.</p>
<p>Jedenfalls beschwert sich dein Linker, weil du gewisse Libs nicht linkst, oder deklarierte und benutzte Funktionen/Klassen nicht definierst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1622966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1622966</guid><dc:creator><![CDATA[JustAnotherNoob]]></dc:creator><pubDate>Sat, 29 Nov 2008 16:24:07 GMT</pubDate></item><item><title><![CDATA[Reply to Habe Problem mit Source Code on Sat, 29 Nov 2008 16:33:06 GMT]]></title><description><![CDATA[<p>Und wie würdest du das Problem lösen.</p>
<p>ich bin noch Anfänger ich komm echt nicht dahinter wie ich das zum laufen bringe</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1622969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1622969</guid><dc:creator><![CDATA[kehrenkamp]]></dc:creator><pubDate>Sat, 29 Nov 2008 16:33:06 GMT</pubDate></item><item><title><![CDATA[Reply to Habe Problem mit Source Code on Sun, 30 Nov 2008 01:09:40 GMT]]></title><description><![CDATA[<p>kehrenkamp schrieb:</p>
<blockquote>
<p>Und wie würdest du das Problem lösen.</p>
</blockquote>
<p>Dokumentation der lib lesen und dann richtig einbinden..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1623152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1623152</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 30 Nov 2008 01:09:40 GMT</pubDate></item></channel></rss>