51,593 Topics

Member Avatar for
Member Avatar for qvyhnl

compute recursively a new string where adjacent characters that are the same have been reduced to a single character. So "yyzzza" yields "yza". You must not use loops. Here are some more examples: string_clean("yyzzza") returns "yza" string_clean("abbbcdd") returns "abcd" string_clean("Hello") returns "Helo" please give me some suggestion.

Member Avatar for Clinton Portis
0
186
Member Avatar for eskimo456

Hi there I am building a 3D game in C++ and openGl I came to do a full test of my game the collision detection and things are finally approaching working fully. When I run it it becomes very memory hungry and eats a few Gb of Ram and crashes …

Member Avatar for eskimo456
0
169
Member Avatar for twinb

I"m having trouble with this code can any help? I am trying to find the average, mean, standard deviation #include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; void Fill_Array(int Size[], int& count); void Print_Array(int Size[], int count); double Calc_Average(int Size[], double average); void Sort(int Size[], int numbers_used); …

Member Avatar for frogboy77
0
121
Member Avatar for SoulReaper1680

Hey, I was just wondering whether it is possible to do multiple tasks in a console application at the same time. Like lets say if a program reads user's input and displays output at the same time, can the program carry on displaying output while it waits for user's input …

Member Avatar for SoulReaper1680
0
175
Member Avatar for lasl0w

Hello, I'm doing a full traversal of a binary search tree structure looking for a node by a field that is not the sort key. If the node i'm looking for is the root node, no problem. If it's any other node then the function has a Seg Fault. Anyone …

Member Avatar for lasl0w
0
201
Member Avatar for aquario20

// Exercise 09 // Final grade calculation for a class ============================================================================ #include <cstdlib> #include <iostream> #include <iomanip> using namespace std; const int MAX_NAME_SIZE = 25; // Structure to hold StudentInfo struct StudentInfo { int studentID; char name[MAX_NAME_SIZE]; int *progExercises; // a pointer to an array of prog exercise scores int …

Member Avatar for Fbody
-3
131
Member Avatar for Stefano Mtangoo

I need to make inspection of my code to Optimise it. Which profiler do you use and recommend? I use CodeLite IDE with GCC Compile (MinGW on windows) and wxWidgets for all GUI stuffs Thanks

Member Avatar for daviddoria
0
86
Member Avatar for cameclifton

[code]Write an application namedCollegeList that declares an array of four "regular" CollegeEmployees, three Falulty, and seven Students. Prompt the user to specify which type of person's data will be entered('C'F'S') or allow user to quit('Q') . While user chooses to continue accept data entry for approate type of Person. If …

Member Avatar for daviddoria
-1
95
Member Avatar for cclausen7

How can I get a numerical value from a string? I am using the command "getline" to store a string. I want the user to be able to enter "assign 8 strength", right now they have to type "assign strength" over and over until they run out of points. Is …

Member Avatar for Fbody
0
138
Member Avatar for jeffpro

Hey guys, I seem to always come back here for help because you guys are amazing. Alright, I need an alternative to ReadProcessMemory for a 4th year University project. I've tried googling for hours and I continue to fail. Hope you can help. Jeff

Member Avatar for jeffpro
0
609
Member Avatar for Taggize

I'm finding issue with my current program. I built the program so that it reads an input code from a file and it is also supposed to display only the code's appropriate salary. However, for some reason, everything I've tried only results in all the salaries being pulled together, not …

Member Avatar for ravenous
0
179
Member Avatar for Orion2k

well,I got some fundamental programming knowledge in C# and some Visual Basic. Inheritance,Arrays,Loops,DataBases,and create library files in VB.NET,create classes in VB.NET and ,create properties and methods and some other things. currently I follow Ivor Horton's Visual Studio 2010 and I feel it may take years to study the whole 1000pages< …

Member Avatar for solfinker
0
244
Member Avatar for kingkolby

create pseudocode program that will be used in a medical office or billing department. The client needs to be able to access a database that contains all of the patient’s information as well as their medical records and billing information. The following features must be included in the final design. …

-2
64
Member Avatar for bussa.forums

i need to send the xml data to [url]http://developer.uidai.gov.in/auth/demoapp/9/9[/url] server but i got 510 as the error code can any one help me what is the problem i am using curl Api cpp function call has made like follows [CODE] int main() { HTTPClient* object=new HTTPClient(); object->SetUrl("http://developer.uidai.gov.in/auth/demoapp/9/9"); o->GetUrl(); o->AddEncodedPostField("input","test1.txt" ); …

Member Avatar for Fbody
0
502
Member Avatar for skorm909

i have a major error whenever i run my code... im using visual studio c++ 2010 express. here's the code: [CODE]# include <allegro.h> # include <iostream> # include <cmath> #define down 0 #define left 32 #define right 64 #define up 96 int main(){ allegro_init(); install_keyboard(); install_mouse(); set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, …

Member Avatar for jonsca
0
259
Member Avatar for Transcendent

Write a program that tests maxLoc(). You can read a data file into a list and call the function maxLoc to find the largest element. HERE IS WHAT IS IN THE TEXT FILE(Name): Josh King Louis Tony Angel here is the code: [CODE]#include <iostream> #include <fstream> #include <list> using namespace …

Member Avatar for abdelhakeem
0
226
Member Avatar for aviavyne

Hello, i have a project which requires that i work with three files. two files are text and one file is .dat Currently I have been successful at creating the dat and one of the texts. The project is a bit menu driven and is about stocks, when the program …

Member Avatar for WaltP
0
189
Member Avatar for faruq1407

[ICODE]:-/[/ICODE]how to get output ths by loop 0 1 1 2 3 5 8 13 21 34 55[CODE][/CODE]

Member Avatar for seanbp
0
125
Member Avatar for Holy_Roller

Alright, I'm working on a project at the moment where I am trying to take a map and populate it with user input through a function. I under stand the basic way of populateing it by simply having something like... [CODE] typedef map< string, string> strMap; strMap["key"] = 'value'; [/CODE] …

Member Avatar for Holy_Roller
0
100
Member Avatar for kleorix

I'm very sorry for my bad English. Here is my problem. [CODE] class A { public: virtual int runAlg() = 0; //pure virtual }; class B: public A { public: int runAlg() { //this is runAlg of B } }; class C:public B { public: int runAlg() { //here, I …

Member Avatar for kleorix
0
74
Member Avatar for blah32

I have never used STL sets before, but I have used some other STL stuff. I am having trouble with upper_bound. I have a class I defined, and I have a (STL set) set of pointers to different instantiations of the class. i compare using a comparison function, which takes …

Member Avatar for arkoenig
0
219
Member Avatar for FangedHavoc

Hi, Basically I'm trying to tie in 3 different classes by using definitions in one class (reference) in another class(library), and then use the function that uses that object in another class(menu). I realize that I could just dump it all in any one of them and be done with …

Member Avatar for FangedHavoc
0
116
Member Avatar for shanedoubleu

I have a whack-a-mole type game using FLTK and I have compiled/run the game on a linux server. I need to compile/run it on a sun machine (putty) and cannot figure out how to do so. I use the following on linux: Compiling the Code: ================== g++ -c Graph.cpp `fltk-config …

Member Avatar for shanedoubleu
0
106
Member Avatar for tofugamer

I am writing a program that converts a hexadecimal number to a decimal number (without using the std::hex and std::dec stuff), and at one point need to change from a double to an int.. However when large numbers, such as 5,726,623,060.00000 are entered, they all get changed to -2,147,483,648 after …

Member Avatar for tofugamer
0
153
Member Avatar for Marissak

I am trying to write a program to add large numbers with stacks. However, I do not know how to get each digit on to a stack individually. This is what I mean: For example, take the input 3784. How do I get the 3, 7, 8, and 4 as …

Member Avatar for Marissak
0
236
Member Avatar for flasp

The assigment sounds like this : Write a C++ program that request and displays information as show in the following example of out: What is your first name? Betty Sue What is your last name? Yew What letter of grade do you deserve? B What is your age? 22 Name: …

Member Avatar for flasp
0
142
Member Avatar for sungilcool

I am slow when it comes to understanding c++ and I don't understand the errors it gives I don't have much time, so please help me #include <iostream> #include <string> #include <fstream> using namespace std; // add other includes if needed //--------- class header - DO NOT MODIFY --------------// class …

Member Avatar for jonsca
0
151
Member Avatar for rodce

I'm having a problem solving part of a C# question from a beginning course. If anyone can help, I would appreciate it. The problem and code follows: When the user clicks the Quit button, display a message box that says "I'm going home." Then when the user clicks OK on …

Member Avatar for Teme64
0
231
Member Avatar for KLane

[CODE]#include <cstdlib> #include <iostream> //Given that f(x)= exp(x)-sin(2x). Use a Newton object to find the minimum of the //function using namespace std; class Newton{ protected: double precision; public: Newton(double p):precision(p){}; virtual ~Newton(){}; double Find(Function& f, double start){};//Find does the actual //iteration for a particular function f starting from a value …

Member Avatar for jonsca
0
104
Member Avatar for abugslife

hey guys! anyone have any ideas of how I can represent my data inside a listbox? i'm currently using sql to connect my database to the program. ive got this code [CODE] SQLiteConnection^ selectConnection = gcnew SQLiteConnection("Data Source=shoesDatabase.db3;"); int i = listBox1->SelectedIndex + 1; SQLiteCommand^ selectCommand = gcnew SQLiteCommand("SELECT * …

0
47
Member Avatar for abugslife

Hey guys! I am newbie to this, I'm in need for help in my C++ project, I seem to be getting this error and have no idea why it keeps saying the same thing, i created header and cpp files but this error is annoying me: projectnew.obj : error LNK2005: …

Member Avatar for abugslife
0
81
Member Avatar for Red20XX

Hi everyone, I am doing a C++ project for school in the UNIX lab that requires inheritance. My main program is calculating linear regression for some plotted points and I'm inheriting a linear system solver from another program. The linear system solver is suppose to print the solved values to …

Member Avatar for Red20XX
0
351
Member Avatar for jamesf786

Hello, I am trying to work on a program which is like this: There are several offices and each office is open on different times on different days. User inputs desired day and time and I have to return every office which is open on day and time user provided. …

Member Avatar for jonsca
0
119
Member Avatar for Vindal

Hey Everyone, I have some code here that I am trying to make. I made a two dimensional array that stores a high temperature and a low temperature then displays the average, but I am having a hard time getting it to display the Highest and lowest amount in the …

Member Avatar for WaltP
0
579
Member Avatar for garevn

Hello, i am new in c programming it is just the second month i i deal with. I am really confusing about what i have to do with this exercise pls don't lough on me I hope for some help. That's what i have to do.. I have to modify …

Member Avatar for WaltP
0
653
Member Avatar for cameclifton

I have a project that has four classes descending. Person is the first class, CollegeEmployee,and Student are classes that descend from the class Person. The class Faculty descends from CollegeEmployee and has a Boolean field that indicated whether the Faculty member is tentured, as well as methods that override the …

Member Avatar for thelamb
0
149
Member Avatar for suncica2222

I want to copy one bitstream to another but it snaps in runtime assert error subscript out of range window pops up how to fix it? see the code: [CODE] #include <iostream> #include <fstream> #include "boost\dynamic_bitset.hpp" typedef boost::dynamic_bitset<unsigned char> Bitset; typedef std::vector<Bitset> byteArray; int main() { Bitset bitset, bitset2,b3,b4; bitset …

0
78
Member Avatar for lochnessmonster

when would i ever/when would it be a good idea, to ever explicitly use __int8 nSmall; // Declares 8-bit integer __int16 nMedium; // Declares 16-bit integer __int32 nLarge; // Declares 32-bit integer __int64 nHuge; // Declares 64-bit integer over regular int?? in your program

Member Avatar for gerard4143
0
194
Member Avatar for garevn

Hello, i am new in c programming it is just the second month i i deal with. I am really confusing about what i have to do with this exercise pls don't lough on me :( I hope for some help. That's what i have to do.. I have to …

Member Avatar for Trentacle
0
344
Member Avatar for 07tr0wa07

Hello world, ok so i need a suggestion for my code. this part of my code i need help [CODE]cout <<"\nEnter Each Sales Person # : "; cin >> salesPerson; while ( salesPerson != -1 ) { cout << "\nPlease Enter the product number: "; cin >> product; sales[ salesPerson …

Member Avatar for 07tr0wa07
0
179
Member Avatar for ffmwheeler

I am having a problem with my code for an assignment. I am to take the a dice and roll it 100 times, output the random results, and then ask the user if they would like to roll it again. My only problem is the second and subsequent times the …

Member Avatar for ffmwheeler
0
117
Member Avatar for ayeshakanwal

i m trying CvRunningAvg() function by passing two IplIMages , alpha value and a NULL mask value. it gives me some runtime terminal error. plz can anyone help me??

Member Avatar for jonsca
0
226
Member Avatar for tomtetlaw

I'm trying to make a memory pool, I've got everything sorted out except for one thing: the allocation. I have no idea how to return a segment of the data in the pool. I have it like this [icode]byte *m_pData;[/icode]. How would I be able to return a segment of …

Member Avatar for tomtetlaw
0
265
Member Avatar for joe00

i have the following code but i can not make the color work. where is the problem? #include <iostream.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <math.h> #include <graphics.h> #include <dos.h> #include <bios.h> #include <ctype.h> float xw[8],yw[8],zw[8]; float xe[8],ye[8],ze[8]; int MR[12][2]={{0,1},{1,2},{2,3},{3,0}, {4,5},{5,6},{6,7},{7,4}, {0,4},{3,5},{2,6},{1,7} }; // ¬ ббЁў ॡҐа int pg[6],pr[12]; int …

Member Avatar for jonsca
0
183
Member Avatar for petmol

Hi everyone, I'm kinda new to this - both to DaniWeb and to C++ programming, so I hope you'll bear with me and my rookie questions. Anyways, I'm trying to build a little C++ program that my daughter can use to practice multiplication. It's supposed to receive two numbers and …

Member Avatar for petmol
0
130
Member Avatar for zartasha*

HI, I NEED HELP(c++) actually i make a programme through array in which even no.s print.its an integer type.array size is 20. please help me how can i do this!

Member Avatar for jonsca
0
69
Member Avatar for misfit956

Hello, I'm taking a c++ class and I'm very new to this. I have a project due where I'm to change a program from static memory to dynamic memory an help would greatly be appreciated it. #include <iostream> #include<fstream> using namespace std; // Function Prototypes void getArrays(int [], int &, …

Member Avatar for misfit956
0
130
Member Avatar for Suzie999

After my last project, I passed the finished job onto a friend to test. She reported that when she tried to run it, she was pesented with an error that some dll files were missing (Im sorry I cannot remember them now), I searched while on the phone with her …

Member Avatar for Suzie999
0
116
Member Avatar for shakssage

Hello. I'm trying to print some text using printDocument. I've managed to print out the text I need into a pdf. The text is taken from the database which is initially made when the windows form loads. The problem is: Once it prints, it shows the pdf, which is fine …

Member Avatar for shakssage
0
237
Member Avatar for puretnaant

Hi, I'm having trouble displaying the numbers in the file on the screen. The numbers are in the .data files but i cant get them to display. [CODE]//****************************************************************************** // Exercise: Homework 07 Arrays and pointers // This program reads two sets of integers from the text files A.data and B.data. …

Member Avatar for misfit956
0
171

The End.