49,761 Topics

Member Avatar for
Member Avatar for danymota19

hi i need help!! i need a program where you enter a string and it has to sort the string using insertion sort showing the words in descendent order

Member Avatar for Lerner
0
1K
Member Avatar for darshilpatel34

Declare a structure that contains: student Id, first name, last name, and five test scores. Also declare an array of 10 student structures. Prompt the user and read the student data from the keyboard and store the information in the array. After each student ask the user if there is …

Member Avatar for WaltP
0
158
Member Avatar for CristalEnt

Hello, my problem is, i´ve created a windows program that plays a sound with playsound function from mmsystem.h and then starts a timer that works with getsystemtime and the _systemtime variables. First, the sound is started with the playsoundfuction, and inmediatly after, the getsystemtime stores the current time in a …

0
40
Member Avatar for faintdeath

The purpose of the program is to create an account where you can deposit, withdraw, and check your balance. I have to use class and put it into a project with a .cpp and .h file. When i compile this it works almost perfect, but the balance always starts at …

Member Avatar for faintdeath
0
2K
Member Avatar for Zssffssz

Just want to see if there is a thing to turn oh "Test" to binary/base 2 stuff. This: [CODE]muffins = 12+16%2[/CODE] I think is sortof what I'm looking for but it chops of whatever's bigger than 2.

0
113
Member Avatar for engineerchica

Hi all, I am trying to figure out the code for searching a text file for a word/phrase and then replacing it. Both are user-input values. I've been having a tough time finding some help online because we are required to use get and put, [U]not strings[/U], unfortunately. The controllers …

Member Avatar for engineerchica
0
233
Member Avatar for SCass2010

Hi everyone, At the minute I'm trying to learn XML and reading/parsing xml files with c++ but I seem to be a bit stuck :( I've an xml file [CODE] <?xml version="1.0" encoding="UTF-8" standalone="no"?> <NormalisedFileCheck> <ExpectedFiles> <File>File_Num_1</File> <File>File_Num_2</File> <File>File_Num_3</File> <File>File_Num_4</File> <File>File_Num_5</File> </ExpectedFiles> <ValidProducts> <Product> <Family>Windows</Family> <Name>Windows 7</Name> </Product> <Product> <Family>Linux</Family> …

Member Avatar for jaskij
0
379
Member Avatar for ruval002

i need helping constructing an array of structs, this is my part of my header file which contains the following struct [CODE] struct PCB { el_t id; // contains the priority of the process string state; // current state of the process (e.g running) PCB *next;// link to the next …

Member Avatar for ruval002
0
203
Member Avatar for kyky365

[U]The first round of the game seems okay. The game will generate the result but >1 round , the result wont be show. And the is another mistake I found. For example, when the random no. is 5134 and my guess is 5143 the game will generate the code O …

Member Avatar for WaltP
0
1K
Member Avatar for EnriqueI

Hi everybody, I have a problem and if you could help me as soon as possible I'll really appreciated I have finished a C++ program but I've got a problem in a small part of the program ,I tried to solve it many times but so far I couldn't figure …

Member Avatar for EnriqueI
0
202
Member Avatar for sota

Hi all, I ve been seeking a tutorial,article etc. about 2D cliext::vector . These are using <cliext/vector> library and cliext namespace. At once i need 2d vector decleration and its erase method to remove all rows which are full of zeros. Any help 'll be greatly appreciated.

Member Avatar for sota
0
373
Member Avatar for LdaXy

i'm testing out a template function i created for a header file i'm writing, but it will not compile for some reason. it's giving me problems with iosfwd, although i'm not using it. [CODE]#include <iostream> using namespace std; template <class LOGICAL_AND> LOGICAL_AND __and(x, y) { return x==y ? 1 | …

Member Avatar for jaskij
0
298
Member Avatar for randrum1707

Hey everyone, I'm trying to remove all punctuation from a string of characters. Here is the part of the code that I'm using to remove the punctuation from the string (string1 being the string). [CODE]for (int i =0; string1[i]; i++) { if(ispunct(string1[i])) string1.erase(i,1); } [/CODE] It is removing punctuation perfectly …

Member Avatar for mazzica1
0
522
Member Avatar for engineern

I have an assignment to program a simple program that names each member in my family and how they are related to me. The program compiles and all, but as soon as i type in any name, this is what shows up: Run Command: line 1: 3805 Segmentation fault: 11 …

Member Avatar for engineern
0
177
Member Avatar for inspire_all

i recently read that we can pass function to a function by using pointer to a function. i tried with an simple example.i defined sum function and passed it to average function so that it calculated average of return value from sum and 2 more nos.. rather than convenience point …

Member Avatar for rubberman
0
251
Member Avatar for lbgladson

In the program below I am trying to overload the +, -, *, >>, <<, ==, and != operators. I cannot get the code to compile and am not sure what I'm doing wrong. I have posted the code and error messages below: Complex.h [code] #include <iostream> using namespace std; …

Member Avatar for lbgladson
0
603
Member Avatar for jman2011

Here is what i got. I need to count the Uppercase entered in a string. Can someone help me? Enter string: The Brown Fox #of Upper Case: 3 My Progress: #include<iostream> #include<string> usingnamespace std; int main() { char string[15]; cout<<"Enter string: "; cin.getline(string,15); . . . . } I need …

Member Avatar for WaltP
0
193
Member Avatar for fredsilvester93

in function stars code is returning garbage value if i input date between 20 Dec - 19 FEB (it should return 0) i want it to return either 0,1,2,3,4 satisfying the condition... Please help me with this problem!! [CODE=c]#include <iostream> #include <string> #include <stdlib.h> using namespace std; int stars(int date, …

Member Avatar for VernonDozier
0
100
Member Avatar for Jnk

Hello I am a new to C++ and have some questions. I have two classes called Point and Square like this: [CODE] class Point { int x, y; public: int getx() const { return x; } int gety() const { return y; } Point(int a, int b) { x = …

Member Avatar for Jnk
0
455
Member Avatar for Matkoo

Hello, guys. I made a program to compare numbers, Example input: [QUOTE] 1 3 10 845157 2 1101101 16 5AE12 [/QUOTE] It transfers numbers from different number system to decimal, then it compares them, but it is not so fast as i need, maybe just a little advice needed, I …

0
173
Member Avatar for jonnyboy12

Hello all. I am trying to convert this type of string [CODE] array<String^>^ files = OpenFileDialog1->FileNames; to a normal string. [/CODE] I am using a file open form for my program and the file name that comes from the Ok on click is in that form array<String^>^ ; I need …

Member Avatar for ravenous
0
104
Member Avatar for rebelstar

Hello, I have a C file and .h file which i can easily compile on a 64 bit linux platform.( Through eclipse IDE. In the compiler option, i enable -std=c99. Now, with the same file, i want to compile it on c++ compiler. So i add extern c to the …

Member Avatar for rebelstar
0
279
Member Avatar for minnnnnas

Hello! I'm trying to make a simple array that will increase its column size dynamicly and it will have 3 rows. On the 1st row i want the user to enter a name(aka char type) and on the other two rows i want the user to enter some float values …

Member Avatar for sota
0
168
Member Avatar for ruval002

I need help how to change the state of a process using link list queue. any help is appreciated. This is part of my code. what i need is that every time i insert a process im suppose to change its state to READY, and every time i need to …

0
80
Member Avatar for ruval002

So i have implemented the following link list, but i just want to know if i can sort the link list. any help? [CODE] #include<iostream> #include"ll.h" using namespace std; // PURPOSE: contructor which initializes front and rear to NULL and count // to 0 LL::LL() { front = NULL; rear …

Member Avatar for Kanoisa
0
275
Member Avatar for danymota19

Hi, I need help with a program that you enter X and Y, and the program has to resolve a)X^Y *Y b)X/Y it most be recursively and only using addition and subtraction. For division the result most has 2 digits of precision but only using integer example INPUT OUTPUT X=1 …

Member Avatar for Kanoisa
0
112
Member Avatar for Nevicar

Hi everyone, I haven't really found much here on how to input into functions and I'm looking for more information on it. Basically my problem is this: I have to make a function that calculates feet into yards, and I'm trying to find out how to make it so I …

Member Avatar for frogboy77
0
225
Member Avatar for MasterHacker110

I have wrote this program in C++. But it doesnt have the output that it should. Instead of putting out +-++-+ it puts out ++-+++-+++++++-+++-+++--+++. That is just an example it will ofcourse have defirent output but it makes more characters then there is in the origanal string when i …

Member Avatar for vmanes
0
185
Member Avatar for jaskij

This here is a code of my recent uni assignment to render Mandelbrot, Julia and Burning Ship sets, using SDL. The code works properly, using MS Visual Studio 2010 Premium, but displays some errors (either numerical or type casting differences, I couldn't find them) after porting to Linux and compiling …

Member Avatar for jaskij
1
180
Member Avatar for Hand

Hello. I compiled a basic GUI example written with Qt. When I run with valgrind, it tells that there is memory leak. It is stranger, because at each time I run the app, the number of malloc calls are different. Qt seems nondeterministic. [CODE] #include <QApplication> #include <QPushButton> int main(int …

Member Avatar for MastAvalons
0
190

The End.