51,593 Topics

Member Avatar for
Member Avatar for mancmanomyst

Hello Everyone - I'm sorry if iasking a repeat question but i've searched the forums and cant find out what's going wrong. I am writing a program that has a pure virtual base animal class that has three subclasses - Cow, Chicken and Sheep. Objects of the three types are …

Member Avatar for Ancient Dragon
0
97
Member Avatar for Jennifer84

I am trying to write a program that can sense if Any changes was made to the file: [COLOR="Green"]"C:\\Folder1\\One\\File5.txt"[/COLOR] If Any changes was made, then this file will be copied to destination: [COLOR="green"]"C:\\Folder1\\Two\\File5.txt"[/COLOR] So what happens is that the destinationfile will be "Overwrited". I have started out som code but …

Member Avatar for Jennifer84
0
147
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
261
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
111
Member Avatar for profesa23

im a new member who is a junior technician, my c: & d: have dissapeared under my computer and i have already scanned for viruses with karspersky and no viruses where found, the only way i can access the drives is through disc management or creating short cuts on the …

Member Avatar for thunderstorm98
0
87
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
152
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
163
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
108
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
125
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
1K
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
107
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
528
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
102
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
103
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
135
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
130
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
141
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
107
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
186
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
117
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
146
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
123
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
250
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
111
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
112
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
157
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
431
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
355
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
103
Member Avatar for Black Magic

Hey, I got bored so was making this program and i know how to get the highest and lowest number but I was wondering if there was a even quicker way, or would : [CODE=C++]if( number1 > number2 && number1 > number3) highNum = number1; else if( number2 > number1 …

Member Avatar for n.aggel
0
151
Member Avatar for jesseb07

Hey, I've been trying to work with wxwidgets so I can start learning GUI's, problem is, it seems like all their libraries are full of errors. I have a hard time believing that a self-respecting group of people would release, as stable, something that would take hours, if not days, …

Member Avatar for jesseb07
0
153
Member Avatar for hapiscrap

Bloodshed dev c++, recieved 1 error on line 24 (return 0), here is the error.... Compiler: Default compiler Executing g++.exe... g++.exe "C:\Dev-Cpp\payroll.cpp" -o "C:\Dev-Cpp\payroll.exe" -g3 -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3 C:\Dev-Cpp\payroll.cpp: In function `int main()': C:\Dev-Cpp\payroll.cpp:24: error: expected `;' before "return" here is input........ Execution terminated [code] #include …

Member Avatar for Salem
0
348
Member Avatar for ara_neko25

i can't think of the logic of this machine problem.. the problem statement is this.. Using loop, write a program that will ask the user to enter a character for left or right. Then, the user will enter a number. The program should generate a ladder of x wherein the …

Member Avatar for Salem
0
113
Member Avatar for EngSara

hi.... I need a c++ code that read a log ( Contains numbers and letters) file and compute the average.... This is a sample of the log file.... ********************************************************** Input vector # 99: OUTPUT: 0 1 0 1 0 **** Vdd = 1.8 **** Tclk = 0.1 **** SER(FIT): 1.1e-002 …

Member Avatar for EngSara
0
260
Member Avatar for spaceboy

Here's a program idea that I bet is kind of rare. I am working on developing my psychic abilities (seriously), and I want to write a program to assist me in determining how far my 'quick-pick' lotto tickets are straying from random chance. For example, every day I spend $1 …

0
48
Member Avatar for Kevin Baker

I have an assignment for school to make a program called the game of life. This program takes values from a data file and places them in a 2d array. All the values taked are set to true in the array and any empty places default to false. Then it …

Member Avatar for Salem
0
138
Member Avatar for Lotus_2011

Hi, Can anyone help me in this code bubble sort in c++,,, this is my code.......[CODE]void main() { int A[5]={7,2,10,15,3}; int i,j,swap; for(j=0;j<5;j++) { for(i=0;i<5;i++) { if(A[i]>A[i+1]) { swap=A[i]; A[i]=A[i+1]; A[i+1]=swap; } } } for(i=0;i<5;i++) cout<<A[i]<<endl; }[/CODE] :(

Member Avatar for Lotus_2011
0
121
Member Avatar for Cybulski

Hello everyone. Welcome to my first post. I have problem, it didn't brough me here, but maybe someone figure it out, I'm staring at this piece of code for hour. I'm trying to make directory listing class. It puts filenames and directories to vectors. It's not finished, yet not working …

Member Avatar for mitrmkar
0
354
Member Avatar for grommet2481

I know that this is a simple one but never the less I forget how to do it. How do I create white spaces on my screen. Im writting in DEV-C++. I want my output to look something like this Name title pay Sam Uni student shit I know how …

Member Avatar for grommet2481
0
93
Member Avatar for noraantonia

Hello, I have a question. I work in visual c++ in a document/view arhitecture (SDI application) and i draw some stuff with some opengl functions (cubes, cylinders) but when i hit the "New" menu from the File menu it doesn't erase or clear my drawing I don't know why. Can …

Member Avatar for noraantonia
0
91
Member Avatar for alikoli

Hello every body.............. any one can help me about this program. I want to create a simple program in C++ i want When the program runs they prompt "Enter the Names:" for example: Name1: Abc Name2: Cup Name3: Altavista Name4: Yahoo Name5: Mbni Name6: Sun Name7: Mani Name8: Google Name9: …

Member Avatar for scarface3288
0
789
Member Avatar for monstro

Aside from access specifiers (private, public, protected), what differentiates structures and unions from classes in C++? I have been told that in C++, classes and their associated components are instantiated in memory in pretty much random order, but structs and unions are instantiated in a fixed order? Is this true? …

Member Avatar for Duoas
0
186
Member Avatar for megatr0n

okay so I'm not sure how to do this, but suppose i have a struct that looks something like this: struct soundNode{ string identifier; sound new_sound; soundNode* next; soundNode* prev; }; sound is an object that is defined by a .h file. and in my main program, i have a …

Member Avatar for VernonDozier
0
78
Member Avatar for kashi_787

I want to read file in binary mode using fread() into structure members. following is the code which works perfectly on Turbo C compiler(DOS base) but doesn't work for VC++ 6, it is giving exception at fread() statement. The input to this file we can give any .bmp file name …

Member Avatar for jephthah
0
146
Member Avatar for putagunta

Hi, I am debugging with gdb a huge program on HP-UX. It has a very strange behaviour and I could not identify the cause. Have a look at this for example: (gdb) c Continuing. Breakpoint 2, CExtract::extractDAT (this=0x80000001007bb9d8, user=@0x80000001004d4670) at Extract.cpp:1761 1761 meas.getSumMethodName ( sCol.meas_sum_method_name ); (gdb) p &meas $9 …

Member Avatar for putagunta
0
85
Member Avatar for noraantonia

Hello, I have a question. I work in visual c++ in a document/view arhitecture (SDI application) and i draw some stuff with some opengl functions (cubes, cylinders) but when i hit the "New" menu from the File menu it doesn't erase or clear my drawing :( I don't know why. …

Member Avatar for mitrmkar
0
191

The End.