Beginners - November 2017 (Page 27)

Not really sure why my program isn't running but can someone correct the errors
 
#include <iostream> #include <string> using namespace std; double FindCost( char woodType, int numPieces,int width, int length,int height); void main() ...
[2 replies] Last: void main() isn't C++. int main() is C++ Your findcost function i... (by Repeater)
Creating global and local objects
 
I'm having trouble remembering how to create global and local objects for an assignment I have to do. Can anyone give me an example how I should create a global...
[2 replies] Last: three of them to get you started: int global; static int persists; vo... (by jonnin)
cin and geline
 
The input was "abc" and the desired result was "name1: abc", another input (Let's say"d f"), "name2:d f" However, the real output was "name1: bc name2: " W...
[3 replies] Last: Thank you all for your help and reply! (by closed account Gv0G3TCk)
[NEED HELP] Program for creating a random deck of cards
 
Hi guys, I need help with my code, it's a very long code and it is not working well, test it if you want. But it is suppose to create a random deck of cards wit...
[1 reply] : It is in french, but you can easily understand it. French grammar is ... (by Enoizat)
Need help with a Test average application
 
I need help with an assignment that makes me create a program to calculate test averages, it would be helpful to give me answers by the 14th, because thats when...
[6 replies] Last: ok, i got it working, it was the program i was using(i was using jdood... (by Dietmil20)
I don't get what is wrong with my program
 
So the exercise that i have wants me to find how many numbers are missing from the telephone number from 0 to 9 and which numbers are these.Also the telephon...
[2 replies] Last: οκ now i get it thank you. I thought the numbers in a string were s... (by NOSgraf)
Can't search an array of objects for a matching string
 
I'm trying to search an array of objects to find a match for a string that a user types in, however no matter what the user types it still displays an error, ev...
[1 reply] : On line 13: Index != -1 is the positive case. You have it backwards.... (by coder777)
Displaying an array
 
I need help displaying an array. This program is supposed to ask the user to display number 1-100 using a loop and break out of the loop when the user inputs -9...
[7 replies] Last: @hh98265 One way would be to change line 13 and 14 to.. int i = 0; ... (by whitenite1)
by kopev
add two char*
 
I'm coding in c/c++ is there a way to concatenate two char* fast instead of memcpy each time perhaps in c++ ?? I don't want to use strcpy/str function becau...
[4 replies] Last: what the point of using std::memcpy if it has the same parameter than... (by mbozzi)
by tgrump
Please help me with my C++ code! (using fstream)
 
Hi! I am new to C++ programming and I need to write a code that will read from one file, multiply or square numbers in the file and put the results into a newly...
[1 reply] : Hello tgrump, Welcome to the forum. I think you tried to use code tag... (by Handy Andy)
by f2200j
Problem reading input file
 
so i want the program to read five value from a file and if a value doesn't exist it should display an error. I think the problem starts with line 36 where it s...
[4 replies] Last: That worked. Thanks (by f2200j)
by zablas
What is the best MOOC to learn about algorithms and data structures in C++?
 
Hello! I am a 17 year old student and I am trying to upgrade my programming knowledge. I currently know quite a bit about C++ (but probably not enough to call m...
[2 replies] Last: you will notice that 85% of a classic ds/alg class is found in the STL... (by jonnin)
by mcr1
Help Me Understand: weird practice question
 
I'm having an issue understanding what the following question wants: Assume that the code below is executed as a part of a valid C++ program: C-strings input...
[1 reply] : I think one point it's trying to get at is how cin works - if the inpu... (by wildblue)
FCFS Scheduling Algorithm
 
Hello, i'm trying to write a simulation of a First Come First Served scheduling algorithm and im having problems with and error which says "deque iterator not d...
[4 replies] Last: Thank you for the replys,ill see what i can do based on the suggestion... (by LastSeen)
Help *urgent
 
I'm supposed to write a program that prompts the user to enter as many values as they want between 1-100. Using an array, I believe I'm supposed to display the ...
[7 replies] Last: In the for loop at line 13-14 the code outputs all 100 elements of the... (by wildblue)
by vpham1
im stuck on this
 
A geometric series is defined by the following: a + ar + ar2 + ar3 + ˙˙˙ + arn-1 a is the first term. r is the “common ratio.” n is the number of...
[4 replies] Last: #include <iostream> #include <cmath> int main() { double a, r = ... (by mbozzi)
FLTK function help
 
I'm having trouble grabbing the x and y coordinates of button using the functions x() and y() included in the fl/fl_widget.h file. And how could i create a but...
[no replies]
by vpham1
help pleaseeee
 
can anyone help me with printing the alphabet in this specific pattern? A B C D E F B C D E F C D E F D E F E F F
[5 replies] Last: here you go: #include <iostream> #include <string> int main() { ... (by closed account SECMoG1T)
Multimap, How to find an element in map with its value but not the key?
 
Hi, I am using std::unordered_multimap, I want to use the value of element to find the key, which the element belongs to. But the member function find() can on...
[2 replies] Last: https://stackoverflow.com/questions/37950521/finding-an-element-in-a-m... (by gunnerfunner)
I need help starting the program for this assignment
 
The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as ...
[1 reply] : price = 100 roomsBooked = ? discount = 0 if(specialOccasion) { i... (by BerlingSwe)
November 2017 Pages: 1... 2526272829... 33
  Archived months: [oct2017] [dec2017]

This is an archived page. To post a new message, go to the current page.