
please wait
Alphabetical Order Using a Vector |
I was attempting to build a program that would read a string of words that were entered using a vector and put them in alphabetical order without repeating any ... |
Jul 16, 2015 at 11:05pm
[1 reply] : Do you see where your while loop ends? Hint it is not on line 14 I kn... (by kevinkjt2000)
|
by stav
linked lists
|
hi i'm trying to build a linked list but i've run in to a problem... for some reason i can't print it out? it compiles just fine with no errors but when i run i... |
Jul 16, 2015 at 11:01pm
[2 replies] Last: This seems to be a simple example of a linked list using a class descr... (by CodeWriter)
|
by keanedawg
Why are my Char * values not equal, if I'm giving them the same value?
|
These two values are set to the exact same thing basically, but for some reason, crate != "0 HEAD". char crate = "0 HEAD"; if (crate == "0 HEAD") ... |
Jul 16, 2015 at 9:06pm
[3 replies] Last: OK. That was super helpful. Thanks guys! (by keanedawg)
|
What is this program doing? |
What is this program doing? #include <iostream> using namespace std; int main() { cout<<"This program computes the average of "; cout<<"a list of (... |
Jul 16, 2015 at 9:03pm
[2 replies] Last: if i enter a negative number it averages out only the non negative num... (by gregorydouglas89)
|
by AlphaAce
need help with a program
|
Okay, so I have an assignment, and I have been breaking my head for days can't figure it out. The idea is to creat a program that reads numbers from a file, ... |
Jul 16, 2015 at 5:57pm
[4 replies] Last: Thanks a lot! (by AlphaAce)
|
key calculations are not happening... |
Running into a little trouble with this one. The comments on the code pretty much explain what the program is supposed to do. I'm just brain farting on it. I go... |
Jul 16, 2015 at 4:18pm
[2 replies] Last: this did the trick....code updated above. Thanks Mike (by ironsoldier71)
|
by brachburton1
Running mean and variance
|
Almost done with my dice roll simulator which simulates a roll given a XdY user input. There's only two problems: that my mean and standard deviation are all o... |
Jul 16, 2015 at 1:23pm
[2 replies] Last: Awesome, thank you. Totally obvious now that I think about it. I also... (by brachburton1)
|
by sajis997
initialize the smart pointer to nullptr by default
|
Hello, I have the declared the vector of shared pointer as a member of the class. Is it necessary to initialize the pointers to nullptr inside the construct... |
Jul 16, 2015 at 11:28am
[1 reply] : smart_ptr will be nullptr by default. (by coder777)
|
by suppa
Diagonal Lines problem!
|
I have been working on this for 2 days now and cant seem to get it right. So any help would be greatly appreciated. For this problem i should be able to input a... |
Jul 16, 2015 at 10:32am
[11 replies] Last: #include <string> #include <iostream> int main() { int L = 0, R ... (by closed account 48T7M4Gy)
|
by coding6
Design Using a For-Loop
|
Input the number than make an X in the following way, for instance, when you input a 5 you output 5 1 4 2 3 4 2 5 1 when you input a 7 you ou... |
Jul 16, 2015 at 7:58am
[1 reply] : First make sure that the user entered an odd number -> (X % 2) != 0 ... (by coder777)
|
Cin holding passing info into next cin |
I've noticed that although my code "works" if you follow the rules, adding more numbers causes this value to be passed to the next cin. for example in this pro... |
Jul 16, 2015 at 5:52am
[8 replies] Last: That is considerate, but funny thing is your code still has the proble... (by Digitalwolves)
|
by brittManka
Question with constructor initialization
|
When I initialize my constructor like this : Person::Person(std::string newName, int newAge): name(name), age(age) {} And have.. std::string ... |
Jul 16, 2015 at 5:31am
[1 reply] : I already answered this question here: http://www.cplusplus.com/forum... (by Disch)
|
by brachburton1
Weird output in dice roll simulatr (XdY)
|
So I'm writing a program that simulates a dice roll based on an input given by the user in XdY format where X = the number of dice to be rolled and Y = the numb... |
Jul 16, 2015 at 4:50am
[3 replies] Last: Protip: Use a debugger. Set a breakpoint and step through each line ... (by Disch)
|
problems with arrays |
What I thought this was going to do was put numbers in lineArray and rowArray. lineArray would be 1 and lineArray would be 2 etc. that's not the output I'm g... |
Jul 16, 2015 at 3:27am
[18 replies] Last: ASCII characters are integers. That is why you are getting blanks and ... (by closed account 48T7M4Gy)
|
by DontheOne
how to smoothing filter
|
Write your question here. I have a program that gives a distance reading ok. However it jumps around a lot so I need to make a smoothing filter. The print line... |
Jul 16, 2015 at 2:13am
[9 replies] Last: I think you will like to play with he Arduino stuff. Adafruit is a rea... (by DontheOne)
|
by suppa
Displaying Diagonal Lines that intersect using for-loops (1,2)
|
Hello, in my assignment i need to 1)Input the number than make an X in the following way,for instance, when you input a 5 you output- -5---1 --4- 2 ---3 --4-2 ... |
Jul 16, 2015 at 1:57am
[32 replies] Last: This is still extremely hard, i am trying to modify it to where it dis... (by suppa)
|
by ephraimr
Help with Turbo c++
|
So this is a beginners question. I don't know much about compilers so correct me if I'm wrong. I'm in (equivalent) of grade 11. In school, the computers have Tu... |
Jul 16, 2015 at 1:43am
[4 replies] Last: CodeWriter, Surely you have been provided with some similiar text boo... (by ephraimr)
|
recursion advice |
Hello, this was my problem to figure out... write a function that takes an array and displays the elements in the array in reverse using recursion and not a l... |
Jul 16, 2015 at 12:43am
[1 reply] : Why does fillArray have a hard coded 10 in that loop? It should use t... (by kbw)
|
by nofish
overloading operator>> ()
|
In this book I'm learning C++ there's an example of a String class with an overloaded operator>>() via friend function. #include <iostream> #include <string... |
Jul 15, 2015 at 11:35pm
[4 replies] Last: Erm, nope. As kevinkjt2000 said, your GetString() returns a const c... (by nofish)
|
by eons93
I'm back from slaying errors and only 23 deadly errors remain. (1,2)
|
day 3 of my error clean up :D I want to thank you everyone in advance and in the past that has helped me. Main.cpp #include <iostream> #include <ctime>... |
Jul 15, 2015 at 8:21pm
[24 replies] Last: haha, thanks, I've ran into a new problem now though. I'm trying to ha... (by eons93)
|