49,757 Topics

Member Avatar for
Member Avatar for rwarlord

I am having a hard time deciding whether to use pointers or not in my nested data structures. Memory and CPU efficiencies are important as I am dealing with data files of sizes on the order of gigabytes. I have decided to use several classes that are nested in a …

Member Avatar for rwarlord
0
395
Member Avatar for Annettest

I have a vector of strings. Each vector element/string is a name, like: Mother_Hen. I want to remove the _ and replace it with a space. Does anyone know how to do this? I have tried using find, but have had no success (I get no result). Thank you for …

Member Avatar for srivairam
0
162
Member Avatar for sara90

hello every body i want to know how to save a linked list int a text file and how to load a file in a linked list ?? any one can help me and give me a simple example code thanks in advance

Member Avatar for template<>
0
118
Member Avatar for clutchkiller

The question is in the title. Rather then making a call to the OS, is there a more efficient way to do this? Thanks Edit: Just though of something else to. Does Sleep(2000); make a call to the OS as well? If so is there another way to do this …

Member Avatar for Narue
0
2K
Member Avatar for ekailan

I have this line of code in my program which works fine except that the memory utilization is high I need to convert all parts to dynamic allocation but i have error at this line strcpy_s(p,sizeof(p), line.c_str()); [CODE][/CODE] the original code is : [CODE] ifstream inFile1, inFile2; string pattern,text,line; cout<<"Enter …

Member Avatar for Sky Diploma
0
163
Member Avatar for Sky Diploma

Hey Guys, I am developing an APP using WxWidgets and some other cross platform frameworks. Then there is a new need into the project to use Bluetooth as a transmitter of Data between 2 devices. I have been using the Mingw compiler all along for developing my app and suddenly …

Member Avatar for jonsca
0
754
Member Avatar for opawix

guys i just ask some questions about making a dev c++ codes in ascending numbers order. executing the first number then the next number increasing the number adds to it. its like a loop. tnx guys for d help. any help. pls. im needing dis for my defend. im starting …

Member Avatar for jonsca
0
166
Member Avatar for plang007

In the function largest, it works correctly for numbers greater than 2 such as 3, but does not give me the correct results for numbers 1 and 2 when entered. How would I fix this. [CODE]#include <iostream> #include <cmath> #include <iomanip> #include <fstream> #include <string> using namespace std; int nexta(int …

Member Avatar for Arbus
0
228
Member Avatar for Jbvo

I have been looking for an answer for the last few hours on google with no success. I am trying to create a program that will determine what file to open from user input. For example: names of the text files are xaa through xzz. The text files contain integers …

Member Avatar for Jbvo
0
290
Member Avatar for Ronnie147

Hello I'm trying to create a program that reads a number(which is the amount of pairs) then you input the pairs and then for each pair it prints the prime numbers between the 2 numbers of the pair.Here's the code: [CODE=c++] #include <iostream> using namespace std; class Prime { int …

Member Avatar for Zjarek
0
201
Member Avatar for annitaz

Sort the list using quick sort with the middle element as pivot. Show the state of the list after each call to the partition procedure. Pivot = 5 Smallindex = i Index = j ⇒ j ≤ 5 (pivot) 11 8 9 4 2 5 3 12 6 10 7 …

Member Avatar for rubberman
0
100
Member Avatar for lochnessmonster

ok so for most of my error handling i throw and exception and log the info of the error to a file...my question is...what should i do if the program/system is unable to log it to a file? should i throw an uncatched exception? should i just call exit()? i …

Member Avatar for rubberman
0
103
Member Avatar for hansoppa

One DNA strand gatcctccat atacaacggt atctccacct caggtttaga tctcaacaac ggaaccattg ccgacatgag acagttaggt atcgtcgaga gttacaagct aaaacgagca gtagtcagct [COLOR="Red"]DNA reads [/COLOR] gatcctccat [COLOR="red"]ata[/COLOR] ggt atctccacct [COLOR="red"]ata[/COLOR]caacggt [COLOR="red"]atc[/COLOR] cct caggtttaga [COLOR="red"]atc[/COLOR]tccacct [COLOR="red"]cag[/COLOR] aga tctcaacaac [COLOR="red"]cag[/COLOR]gtttaga [COLOR="red"]tct[/COLOR] aac ggaaccattg [COLOR="red"]tct[/COLOR]caacaac [COLOR="red"]gga[/COLOR] aac ggaaccattg [COLOR="red"]gga[/COLOR]accattg [COLOR="red"]ccg[/COLOR] gag acagttaggt [COLOR="red"]ccg[/COLOR]acatgag aca ggt atcgtcgaga acagttaggt atc aga gttacaagct …

Member Avatar for rubberman
0
109
Member Avatar for Learath2

[CODE]#include <cstdlib> #include <iostream> using namespace std; long int factorial(long int num) { long int i = num; long int add = i; while(i != 1) { i--; add *= i; } return add; } int main() { long int uur; cout << "Please Enter A Positive Integer:"; cin >> …

Member Avatar for jonsca
0
80
Member Avatar for fistpunch
Member Avatar for yuyumerry

i got problems to do this c++ program..hope you guys can help me.. You may use output statements that print either a single asterisk(*) or a single blank. * *** ***** ******* ********* ******* ***** *** *

Member Avatar for yuyumerry
0
108
Member Avatar for harinath_2007

Is there any good C++ editor for Windows 7 ???? Generally turbo c++ takes 100% CPU processing in windows 7 so i am in search of a good and advanced c++ editing tool for windows 7 Is there any????

Member Avatar for mike_2000_17
0
252
Member Avatar for queos

Please help answer this question A customer has two bank accounts, the variable of the bank acounts are bankAcc1 and bankAcc2, and the variable name for the balance of each account are: balance1 and balance2. write a while loop in which the two bank accounts (bankAcc1 and bankAcc2) may not …

Member Avatar for queos
-2
84
Member Avatar for kocmohabt33

Hi, I'm currently trying to learn programming in WinApi C++. Let's say I have a ListBox whose ID is "IDCL_LISTBOX" and I clicked a selection on it. A notification goes to my Message Procedure and I filter it through WM_Command. I look at what the LOWORD and the HIWORD of …

Member Avatar for kocmohabt33
0
428
Member Avatar for Roo0ond

I must do my work program to resolve these issues please help me where should I enter the following: function :x^3+4x^2-10=0 interval a : hnterval b : tol(Permissible error): The program gives the number of times the solutions and the general solution and when it is smaller than tol pleas …

Member Avatar for Roo0ond
-1
140
Member Avatar for MattWhitehead__

Hello, Can anyone help with this error? [url]http://img27.imageshack.us/f/errorpq.jpg/[/url] I try and click text in the list box and it crashes. Thanks, Matt :)

Member Avatar for MattWhitehead__
0
731
Member Avatar for Kumar_cr09

Hello....Myself kumar..Am doing a automation code where am testing few test cases one after the other and storing the result(whether the test is passed or failed) in a result.txt file.Now what I have to do is after the test completion i want to send that file to my mail id …

Member Avatar for Kumar_cr09
0
96
Member Avatar for finston

I am trying to rework some older code for Windows Vista and 7 (and other platforms as possible). I have almost all the source code (C and C++) but my developer did not make it clear which code was used to compile and link to make the 32 bit executable …

Member Avatar for finston
0
555
Member Avatar for pdenman

Hi all I am a total newbie and am self teaching myself. I worte a program that lets the user guess a random number and then asks if if they want to play again.\ Here is the code: [CODE]#include <iostream> #include <cstring> #include <stdlib.h> #include <ctime> #include <conio.h> using namespace …

Member Avatar for pdenman
0
2K
Member Avatar for CrumbledCookies

Would somebody please assist me? I have been consistently been doing trial and error with my counter. You see, when the program cannot locate an item (which is typed at the bottom) it displays "Sorry, no such item number exists, please enter another one or 0 to stop." Every time …

Member Avatar for CrumbledCookies
0
355
Member Avatar for NYCrealist

[CODE]int main () I have this question how would find the headers for the five functions that are below without supplying the blocks for them, i dont quite understand it { int x, c; double r; x = readData (); for (c = 0; c < 5; c++) printValues (x, …

Member Avatar for rubberman
0
99
Member Avatar for garber

[CODE]#include <iostream> #include <string> using namespace std; int main() { // Variable declarations allowing us to calculate string fullName; int weeklySalary; int weeks; string age; int option; int actualage; int earnings; double savingsPercentage; double percentage; int retirementage; double total; cout << "What is your name? "; getline(cin, fullName); cout << …

Member Avatar for rubberman
0
137
Member Avatar for ritu143

Hi, I am new to c++, facing difficulty in compiling the following code [CODE]#include <iostream> #include<string.h> using namespace std; class myclass { public: int i, j, k, *l; // accessible to entire program static int *m; }; int myclass::*m = NULL; int main() { myclass a, b, *p; a.i = …

Member Avatar for rubberman
0
2K
Member Avatar for maxstoto

please guide me....i didnt know how to implement its... my situation is like this :- let say that i have 11111010..... And i want to move the left most side of binary number and add with the 4 bits in the right side, so its can be like this . …

Member Avatar for rubberman
0
147
Member Avatar for g_u_e_s_t
Member Avatar for rubberman
-1
478

The End.