51,593 Topics
![]() | |
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 … | |
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 … | |
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. | |
:S Can you explain me how to link classes with each other? | |
[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'; … | |
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 … ![]() | |
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...... | |
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 … | |
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 … | |
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 … | |
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 … | |
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..... :) | |
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 … | |
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 | |
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 … | |
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 | |
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 | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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) … | |
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 … | |
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 | |
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 … | |
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??? | |
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 ; … | |
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) { … | |
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 … | |
[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; … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] :( | |
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 … | |
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 … | |
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 … | |
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: … | |
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? … | |
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 … | |
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 … | |
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 … | |
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. … |
The End.