
please wait
by maigistr
using default for something else but still need an error message - switch statement
|
I have a problem where I'm trying to write a program to calculate the compensation for days without luggage on Air Canada. I need to have an error message if th... |
Oct 8, 2019 at 7:43pm
[2 replies] Last: Hello maigistr, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
|
by farmerjohn
loop question
|
hi I am trying to loop this code for a user defined period can anyone suggest how i would do this? i am thinking some sort of look but i'm not sure how to imple... |
Oct 8, 2019 at 7:14pm
[4 replies] Last: Hello farmerjohn, That is easy. After the line count++; add a line ... (by Handy Andy)
|
Weird value from finding a variables address |
I've been doing a very basic C++ course online, and one of my first tasks is to create code that sets several variables (called a, b, c, d, e.) a value for thei... |
Oct 8, 2019 at 6:10pm
[3 replies] Last: Thanks guys, I tried 'void' and it worked. Still learning the vocabula... (by Hatched Nails 567)
|
by Depressed
Need guidance on how to calculate average of all inputs with loops
|
//Finding smallest number in a series of user input of numbers #include <iostream> using namespace std; int main() { int age, smallest = 1000, grea... |
Oct 8, 2019 at 5:25pm
[3 replies] Last: #include <iostream> int main() { int count { }; double sum {... (by deleted account xyzzy)
|
by Tru
The same member function for 100 classes
|
Hello all. Is it possible to declare and define a function once: int MyFunc (int a, int b) { int c; c=a+b; return c; } And use it in c... |
Oct 8, 2019 at 4:24pm
[11 replies] Last: @Furry Guy: I got it now. Thanks. I added the .h content. (by Tru)
|
by ajowen30
Make a random generated map within 5 and 50
|
My goal is to give the user an option of choosing the map size, or choosing random map size. If chose random, I need to keep the map size between 5 and 50. I al... |
Oct 8, 2019 at 4:17pm
[3 replies] Last: #include <iostream> #include <string> #include <cctype> // tolower #... (by deleted account xyzzy)
|
by tinaHR
String substring & indexOf
|
Hi all, i am stuck with part of the code and cant figure out where is the problem. Exercise is to play a game where you guess a movie title letter by letter unt... |
Oct 8, 2019 at 3:28pm
[3 replies] Last: I threw it in the garbage can after trying to translate a very simple ... (by jonnin)
|
by Orion98
Sorting Data From Text File
|
I need help on how to write a code that reads and sorts the data from a text file in ascending order. If anyone can provide an example, I would appreciate it! ... |
Oct 8, 2019 at 1:37pm
[1 reply] : Hello Orion98, Do you mean to read the input file and sort as you rea... (by Handy Andy)
|
by lastchance
divisibility check
|
*** Codechef alert *** And the OP has disappeared! |
Oct 8, 2019 at 1:23pm
[1 reply] : Create a struct or class to track the factors and the number of times ... (by dhayden)
|
I am new in C++. please correct me!. |
Write your question here. Question: Does the behavior of the following two codes are correct? DataSource.cpp: #include "DataSource.h" #include "Mem... |
Oct 8, 2019 at 1:02pm
[2 replies] Last: Is it correct? That depends on what it's supposed to do. Since we don... (by dhayden)
|
by SiddhathaRC
to find average for each integer
|
I have two columns in a txt file. Both columns have integer values. column1 contains ID and column2 contains ratings. I want to find average ratings for each ... |
Oct 8, 2019 at 12:47pm
[3 replies] Last: struct stats{ double sum = 0; int n = 0; double average() co... (by ne555)
|
by stephcat5
Setter function not working?
|
Hello I'm trying to get a setter function to store an integer, but the data entered stored end up weird when I try to access them (610861952 & 32764). I'm not v... |
Oct 8, 2019 at 5:17am
[2 replies] Last: Your dummy main() is using startRow uninitialised, but who knows what ... (by lastchance)
|
Possibly really stupid question about data structures |
Hello, I am learning about data structures, and the videos i see creates the data structure, for instance a linked list, and then just fills the linked list by ... |
Oct 8, 2019 at 1:36am
[1 reply] : you may read from a file while (input >> a >> b >> c){ l.append( i... (by ne555)
|
User identified input from computer |
Hello, I am currently working on to create text to Binary converter. There is no problem in the code. However I want to type the text(to convert it into binary)... |
Oct 8, 2019 at 12:22am
[3 replies] Last: Thank you! (by NoobProgrammer002)
|
by iAMMAKi
Undefined reference to template class
|
What am I doing wrong here finaladt.h #ifndef FINALADT_H #define FINALADT_H #include <iostream> using namespace std; template<class Type> class finalADT { pu... |
Oct 7, 2019 at 5:30pm
[3 replies] Last: Delete the definition of those functions I know what you're trying to... (by mbozzi)
|
by Deadweight77
Adding and subtracting money question
|
I've been introduced with friend functions and the like and have been trying to fix my code. I can't see what is wrong with it though. Any help will be apprecia... |
Oct 7, 2019 at 1:48pm
[2 replies] Last: Oh! Ok that did the trick. Thank you! (by Deadweight77)
|
by JMumford45
Cant figure out error in Bank Simulation logic!
|
My problem is that when I run the simulation for the bank it keeps removing the wrong customers from the Queues at incorrect departure times. Also when it reach... |
Oct 7, 2019 at 4:54am
[3 replies] Last: Cross-posted to: https://stackoverflow.com/questions/58263542/cant-fi... (by deleted account xyzzy)
|
by confundido
Calculating GPA from User Input (with constraints)
|
Hello, I am having some trouble creating a simple program to calculate a GPA from user input due to some constraints placed on the assignment. Namely: ... |
Oct 7, 2019 at 4:49am
[3 replies] Last: I think I solved it using 'cin.get', but if anyone has any other solut... (by confundido)
|
by GachaLuck
Reading from file and placing its contents into an array of objects
|
Hello, I've been trying to read from a file and place its contents to a array of objects in a class and trying to sort them with QuickSort, MergeSort, etc. as a... |
Oct 7, 2019 at 3:21am
[2 replies] Last: Not much, since my teacher at the time didn't do a good job explaining... (by GachaLuck)
|
by VictoryCFC
without using arrays or vectors
|
Brian is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay for two, he feels the need to buy all items in the sh... |
Oct 7, 2019 at 12:28am
[5 replies] Last: Where are you initializing the total and discount? Also, if conditi... (by Duthomhas)
|