49,761 Topics

Member Avatar for
Member Avatar for hocuz pocuz

Hi. I am writing a text-rpg game using c++ and I want to save the gave somehow. How can i do it? Thank you.

Member Avatar for Ancient Dragon
0
257
Member Avatar for WondererAbu
Member Avatar for hocuz pocuz

[code=c++]//Four In a Row #include <iostream> #include <string> #include <vector> #include <algorithm> #include <cctype> #include <cstdlib> #include <ctime> using namespace std; // global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' '; const char TIE = 'T'; const char NO_ONE = 'N'; …

Member Avatar for hocuz pocuz
0
107
Member Avatar for EngSara

hello... I need a c++ ( or java ) code that convert from eqn ( or bench) format into verilog format... Did anyone has an idea?!! Thanks in advanced......

Member Avatar for Sky Diploma
0
84
Member Avatar for shankhs

I have a problem in printing out the permutation of various characters grouped together like string 0 has"ABC" 1: "DEF" 2:"GHI" 3:"JKL" 4."MNO" 5."PRS" 6."TUV" 7."WXY" now i have to print all the permutation of the characters to form 1 letter to 12 letter words lets say i have 2512 …

Member Avatar for Duoas
0
150
Member Avatar for varsha0702

Hi.. I have created a shared object by developing and compiling it on RHEL 5. Than I tried to use same shared object on RHEL 4 and SuSe 10.0.But it didn t work.Error message shown was " Floating point exception". Machine architecture was same for all the three distos. So …

Member Avatar for vijayan121
0
157
Member Avatar for buddha527

I have a programming assignment to write the Knight's Tour. I have completed the code using simple recursive calls, my problem seems to be if the user enters any starting location the program takes longer then 45 minutes to complete and I am not sure if it even completes because …

Member Avatar for jephthah
0
2K
Member Avatar for paltech

im new in c++ language, and im take project as follow: --------------------------------------------------------------------- write a c++ program that take compressed file as input and generate a reproduction of the original uncompressed file contain no digit characters as output, such that: 1- assume that no word contains more than 50 characters and …

Member Avatar for Salem
0
105
Member Avatar for gogoc

can we force a c++ program to end after a certain amount of time i want to force my program to quit after a certain amount of time so that it would not go on for ever..... :)

Member Avatar for gogoc
0
123
Member Avatar for benasour

I just started to learn C++ after I have been programing in C. I use vim and the GNU compiler in terminal to create my programs. When I was working in C I made a generic one-file Makefile so I did have to write out all the tags/switches every time …

Member Avatar for Duoas
0
992
Member Avatar for gogoc

I don't want my programs to access the file system at all means no file creation, no deletion not even the a single stream for accessing files. how can i do that

Member Avatar for Duoas
0
105
Member Avatar for luckystar89

For this project weā€™ll consider a small business that needs an order tracking system. An Order is placed by a customer to purchase a product. The order system must be a menu-driven system that allows the user to add orders, view an order, find an order(s) by date, or list …

Member Avatar for VernonDozier
0
518
Member Avatar for uk101man

Hi, I'm very new to C++ and was wondering how I would go about searching for a string (AT+COPS?) in a file and displaying everything to the right of the string, could someone point me in the direction of a guide cheers

Member Avatar for Ancient Dragon
0
100
Member Avatar for gogoc

How can i restrict the total memory usage of a program. i have to check certain code but i want to restrict the rem used by the program when running. please help me out

Member Avatar for gogoc
0
100
Member Avatar for Run.[it]

My appologies if this has been answered before but I couldnt find a specific answer/response. Basically Im wondering how I would assure each random number is one that hasnt been produced already. In the program below Im trying to use the random number produced to act as a specific number …

Member Avatar for Run.[it]
0
134
Member Avatar for TheGhost

I have problems with the map, in the below loop. [CODE] //iterator declared as "it" and map declared as "aMap" //key of a map declared as "key" while(true){ for(it = aMap.begin(); it != aMap.end(); it++){ //some processing if(//some condition){ //some processing aMap.erase(key); it--; } } //some processing //some conditions to …

Member Avatar for TheGhost
0
123
Member Avatar for Renoldton

Hi, I have a XML file generated externally,i need to traverse through that file and then make certain changes to the XML file or add new attributes to that file.How can i go about it?This eventually will be a Pro*C code.Kindly help me out.Thanks.

Member Avatar for tesuji
0
139
Member Avatar for daviddoria

I have to call a function in the form f(void* params) I would like to pass two vector<double> to this function. I suppose I should make a struct struct MyParam_t { vector<double> myvector1; vector<double> myvector2; }; and then somehow fill it and pass it to the function. Someone recommended that …

Member Avatar for Ancient Dragon
0
104
Member Avatar for Jennifer84

I am wondering how a "Managed vector" is declared. I have worked much with: std::vector<string> OneVector; How is the same declared for a Managed type ? What I am trying to do is to translate this to managed: [code] std::vector<string> OneVector; std::string Stuff = "Hello"; OneVector.push_back(Stuff); [/code] At the same …

Member Avatar for Radical Edward
0
181
Member Avatar for SonxQ7

Hi friends, here's my code.. [code] OnCreate(hwnd,cs,initRecArea(480,45,55,20),(HMENU)IDCE_SINGLELINE5); OnCreate(hwnd,cs,initRecArea(480,105,55,20),(HMENU)IDCE_SINGLELINE7); OnCreate(hwnd,cs,initRecArea(480,135,55,20),(HMENU)IDCE_SINGLELINE8); OnCreate(hwnd,cs,initRecArea(480,165,55,20),(HMENU)IDCE_SINGLELINE9); OnCreate(hwnd,cs,initRecArea(480,195,55,20),(HMENU)IDCE_SINGLELINE10); OnCreate(hwnd,cs,initRecArea(480,225,55,20),(HMENU)IDCE_SINGLELINE11); OnCreate(hwnd,cs,initRecArea(480,255,55,20),(HMENU)IDCE_SINGLELINE12); [/code] Since all these lines are a repetition except the second argument of initRecArea() which increments by 30, and last argument of OnCreate() which only has the last character changing, i would prefer looping this code as …

Member Avatar for Ancient Dragon
0
116
Member Avatar for Sky Diploma

Hi Everyone , I have some doubts which i have encounteered when i was working on a project of mine, 1)I was wondering whether system("sky.exe") could have variables in it. can i use a string in the place of "sky.exe" something like this [code] string s; s="sky.exe"; system(s); [/CODE] 2) …

Member Avatar for Sky Diploma
0
143
Member Avatar for hapiscrap

C++ program in Bloodshed Dev C++, I was told by the compiler log that I have 1 error and I cant figure it out! [code] #include <iostream.h> int main () { int employeeid; int hoursworked; float hourlyrate, grosspay, taxamount, netpay; float const TAXRATE = 0.10; cout << "Enter The Employee …

Member Avatar for Nick Evan
0
121
Member Avatar for shakumar_21

Hi I want to know how to find wheather the particular exe was running or not. By "FindWindowEx" i can get handle of the windows based exe. But i want, wheather Service exe(non window based) was running or not. waiting for your's suggestion about this. thanks regards shakumar

Member Avatar for mitrmkar
0
63
Member Avatar for heav_yduty

Create data base in Access 2003 and try to connect it in my programm using DAO Open("path"). After compiling getting error message "Unrecognized database format db1.mdb". But if i create a data base in program with help of DAO Create, everiting is working. But problem is that i have to …

Member Avatar for mitrmkar
0
244
Member Avatar for Aamit

I want to call System exe of Client from server. How to call driverquery.exe of client from server.... server->call driverquery.exe of client->information to server...... No manual execution on client side.... How to do this???

Member Avatar for Agni
0
107
Member Avatar for mussa187

I am trying to call the method ip_uri from class into the main but it does let me what am i doing wrong? [code=cplusplus] #include <iostream> #include <string> using namespace std; class ip_uri_store { public: string count; // C++ string s are classes so this is aggregation. int id ; …

Member Avatar for mussa187
0
109
Member Avatar for shankhs

Hi all, Do u have any idea that whether I can pass any function as a parameter to another function? like: [code] #include<iostream> #include<fstream> #include<vector> using namespace std; int i=5,j=8; int add() { int c=i+j; return c; } int sub() { int c=j-i; return c; } int try(int *add) { …

Member Avatar for RenjithVR
0
152
Member Avatar for e_pech

Hey! I'm working with MFC (SDI) and I have 3 views in the window (TreeView, FormView and OpenGL). Everything is working ok. Now I want to add a new item on the TreeView to display on the FormView the details of the selected item, however the new items belong to …

Member Avatar for e_pech
0
422
Member Avatar for bhuwanrc

[code=cplusplus] #include "Student.h" #include<iostream> #include<cstdlib> #include<string> using namespace std; Student::Student() { name=" "; surname=""; assignment1Mark=0; assignment2Mark=0; labTestMark=0; examMark=0; } Student::Student(string name,string surname,int a1, int a2, int test, int exam) { name=name; surname=surname; assignment1Mark=a1; assignment2Mark=a2; labTestMark=test; examMark=exam; } string Student:: getName()const { return name; } string Student:: getSurname()const { return surname; …

Member Avatar for vmanes
0
345
Member Avatar for Jennifer84

I am trying to exctract "MainLine" from 1 string and two int:s like below but I think I am on wrong track. If the line was in a .txt file I could do something like this I know but I donĀ“t know if it is different if the Line already …

Member Avatar for Ancient Dragon
0
93

The End.