49,761 Topics

Member Avatar for
Member Avatar for Magic681

So the task is relatively simple; create a program that will generate a random number, and then prompt the user to input a number. If the is lower or greater than the generated number, a message will display whether you're lower or higher than the number. The program also records …

Member Avatar for ravenous
0
383
Member Avatar for wids101

can someone help me, my code won't compile. #include <iostream> #include <string> using namespace std; int main() { int hi, lo, mid; bool found; char status, reply; do { cout << "Think of a number between 0 and 1000" << endl; cout << " Write it down, I will guess …

Member Avatar for wids101
0
206
Member Avatar for joey777

I would like to see how the solution 3.16 looks after it's all done. I've tried to run my program, but it won't run. Can someone please forward what it should look like before I run the program. I must be missing something...?

Member Avatar for BobS0327
-1
567
Member Avatar for Carc369

I'm in an introductory CS course and our task is to build the best ideal boggle board (one that would get you the most points). We are allowed to use arrays, c-strings, and reference parameters (no structs/pointers since we are just starting to learn about those). Step one: I built …

Member Avatar for Carc369
0
2K
Member Avatar for augustinquizzy

c++ program that uses the class bookType and tests various operations on the objects of the class bookType. Declare an array of 50 components of type bookType. Some of the operations that you perform are to search for a book by its title, search by ISBN and update the number …

Member Avatar for Ancient Dragon
0
182
Member Avatar for caven.chunyen_1

Hi Daniweb, I've have an assignment which is to modified the cpp script for ns2 simulation. I need to modify it so that the size is multiply by 2 over 10 interval and change back to the original size after 10 interval. I've changed the code in the modified field, …

Member Avatar for rubberman
0
213
Member Avatar for gg652

I need a program that will ask 16 true or false questions. The game needs to keep going until the user either answers 8 questions correctly or 8 inncorectly. A message should inform the user wether they won or lost and ask if they would like to play again, at …

Member Avatar for rubberman
0
277
Member Avatar for blee93

I am doing Project Euler Problem 3, but I seem to get stuck. I have written some code that makes sense (at least to me) but keeps printing the answer to 137. This is the problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the …

Member Avatar for vCillusion
0
363
Member Avatar for SuburbanSamurai

Hi, I have been coding for a number of years but cut my teeth with mud (multi-user dungeon) merc code. I have never coded a gui program before only console based applications. I have a program that I am trying to write in gui and have sort of gotten the …

Member Avatar for Ancient Dragon
0
205
Member Avatar for kmlilo

#include <iostream> #include <cmath> #include <string> #include <fstream> #include <windows.h> using namespace std; struct Grade{ int getA; int getB; int getC; int getD; int getF; float marks[100]; }; void init( Grade* student ){ student->getA=0; student->getB=0; student->getC=0; student->getD=0; student->getF=0; for( int i=0; i < 100 ; i++) student->marks[i]=NULL; } int readFile( …

Member Avatar for deceptikon
0
287
Member Avatar for vicky30312

Hello, I am new at c++ and need some help. The project we were given is to write a program that asks the user to think of a number between 1 and 100, then attempts to guess the number. The program should make an initial guess of 50. The program …

Member Avatar for Gonbe
0
328
Member Avatar for umesh314

Hi I am trying to run the post fix and pre fix operation in C++. The code which I tried is given below. #include <iostream> using namespace std; int main() { int a =0; cout << ++a + ++a + ++a << endl; // 7 a =0; cout << ++a …

Member Avatar for Lucaci Andrew
0
248
Member Avatar for Mainul20
Member Avatar for Gonbe
0
71
Member Avatar for lucasbernst

Hello all, This is my first time posting in this forum. I searched and found a similar post from years ago, but was unable to find an answer. I'm hoping some of you may be able to help me. I've been assigned a problem in which 20 integers must be …

Member Avatar for Lucaci Andrew
0
2K
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* How do i Parse??? Can you guys Teach me how to parse a Config File? i Do have the Boost Librarys Installed so if any of you have a way to do Parsing with it then thats ok, I will be able to Follow :) Here is …

Member Avatar for ravenous
0
188
Member Avatar for daino

Has anybody ever installed libjpeg for windows. I have a MingW compiler, MSYS if needed and the instructions are leading me nowhere. It seems to require an understanding of one thousand obsolete systems to get anywhere. Must I have MSYS installed? Can I install using the windows CMD Prompt? Is …

Member Avatar for vijayan121
0
3K
Member Avatar for challarao

hi all, In the book "Programming Languages-Pragmatics" second edition by Michael l. Scott and Morgan Kaufmann, there is a sentence while explaining about copy constructor: "In recognition of this intent, a single-argument constructor in C++ is called a copy constructor." This is about the constructor of the form foo::foo(const foo& …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Archaismic

I have found a LOT of info on searching the screen for a pixel color, but none of it even remotely definitive (as far as i can tell, because i'm rather noobish) I understand programming on a fundemental level, but I'm new to C++ I'm hoping to figure out how …

Member Avatar for Archaismic
0
1K
Member Avatar for xxwikkixx

Hey everyone need some help again with finding the min and max from a text file. its my college lab assignment. here is my code till now. #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout; fout.open("Text.txt"); ifstream fin; fin.open("Lab6.txt"); float c; int count = 0; float …

Member Avatar for xxwikkixx
0
1K
Member Avatar for MrEARTHSHAcKER

Hi people, I am making a little experiment to see something. I wished to inherit "string" class and add a function to child class. Function should take a char as parameter and return bool depending on is there such a character in our string or not. I have started off …

Member Avatar for deceptikon
0
117
Member Avatar for xxwikkixx

Hey everyone I am New here.... need some help with my coding for my college HW assignment.... I need to make a rock paper scissor game. I can think of the game in my brain on how I am gona code it but when I try to program it doesnt …

Member Avatar for xxwikkixx
0
403
Member Avatar for on93

Anyone who know what is the code that i have to write in to get the answer ????? with the formula : 1+2!/((x-2))-3!/((x-3))+4!/((x-4)) - ... n!/((x-n)) ------------------------------------------------------------------------------------------------- #include<iostream> using namespace std; int fact (int no) { int total; for (int i=0; i<=no; i++) { if(i ==0) total = 1; else …

Member Avatar for Schol-R-LEA
0
121
Member Avatar for on93

with the formula : Result = 1+2!/((x-2))-3!/((x-3))+4!/((x-4) )- n!/((x-n)) i want the output as : Please key in x value: 8 Please key in n value: 5 result = 1 +2!/6-3!/5+4!/4-5!/3 = -33.8667 ------------------------------------------------------------------------ i have done the code , still cannot get the output , can anyone help me …

Member Avatar for on93
0
137
Member Avatar for SuburbanSamurai

Hello, I am fairly inexperienced with coding and have been having trouble with a program I am trying to write. The problem is that when reading from a text file the program will only read some of the file not all of it. Any help would be greatly appreciated. Here …

Member Avatar for Gonbe
0
221
Member Avatar for Transcendent

can someone give me a hint on how I can fix this function: void computeOrder(int& spoolOrderAmount, int& spoolStockAmount, double shippingHandling = 10.00) the third parameter is supposed to be a default argument. this is the error: **default argument given for parameter 3 of 'void computeOrder(int&, int&, double)' [-fpermissive]**

Member Avatar for Gonbe
0
207
Member Avatar for mmmm9927
Member Avatar for Secone

I've got the following project, which does what is described in the comments, however, when I use VC++ to compile it, it does not run properly, it crashes after I type in the document name. I'm wondering if I could get help on making it run properly. Any and all …

Member Avatar for Secone
0
167
Member Avatar for borchu

Hello, I have a problem about counting consequtive characters, here my code char query[] = "tttthe oneZZZZZ trully loveeee"; void cntfreq(char A[]) { int j; int k=0; j = 1; while (A[j] != '\0') { if (A[j-1] == A[j]) { ++k; cout<<k<<"\t"<<A[j]<<endl; } else k = 0; ++j; } } …

Member Avatar for mrnutty
0
321
Member Avatar for Unidennn

Hi, i have a question about using new/delete classes. This is a simle outline of the code: class a { blah blah blah class b { blah blah blah class c { blah blah blah }; }; }; int main (){ a newA; a::b newC; a::b::c newC; //to call fucntions …

Member Avatar for Unidennn
0
216
Member Avatar for lpanc

I am trying to work on this assignment I have and I am pretty lost and do not know what to do. Any help would be greatly appreciated. This is the assignment: Add two methods (functions) to ex34. /* General Info: Write a copy constructor. Use the copy constructor in …

Member Avatar for Schol-R-LEA
0
148

The End.