
please wait
How to implement a function that return two integers? (1,2) |
I have the following code but it needs to have a function that has a vector as a parameter and return the maximum and minimum of value of n numbers. The vector ... |
Feb 20, 2017 at 1:30pm
[20 replies] Last: Why not use references if you want to return multiple variables? Simp... (by mbozzi)
|
by spax1111111
Ctime
|
When i use the header ctime and then write srand(static_cast<unsigned int>(time(0)); what does this "time" do? |
Feb 20, 2017 at 1:20pm
[7 replies] Last: There are many alternatives to ctime that have a richer, more flexib... (by dangrr888)
|
by bmakloski
Using classes to work with Mathematical Numbers
|
Hi, I am a very inexperienced programmer and in need of some help. My goal for this program is to add, subtract, multiply and divide complex numbers. Complex nu... |
Feb 20, 2017 at 1:00pm
[16 replies] Last: Oh -- the problem is on line 49. Your overload for operator>> needs t... (by mbozzi)
|
by DylanMorganx
Having a class for variables
|
Hey guys, I have variables that are used pretty much everywhere in my game. At the minute I have a class to hold all these variables and then i pass the object ... |
Feb 20, 2017 at 12:34pm
[5 replies] Last: I have changed the way I have done it now, I decided to make it so the... (by DylanMorganx)
|
by nomat
Logic Erros
|
The standard deviation calculation on this program doesn't seem to yield an accurate result. Someone please spot the logic error here. Also maybe help neaten th... |
Feb 20, 2017 at 10:17am
[3 replies] Last: Mmmh ok will re-work this and see what results i get. The test input f... (by nomat)
|
by spax1111111
Problem with while loop!
|
Why when i enter 'q' or 'Q' the while loop executes? char choice_fj(); int main() { int balls;int guess,guesses=0; char choice;choice=choice_fj(); ... |
Feb 20, 2017 at 9:51am
[2 replies] Last: aaaaaaaaahaaaaa yes i can't believe i did this again thx :D (by spax1111111)
|
by raminM
flipAround
|
How can fix this code so my assertions don't fail ? include <iostream> #include <string> #include <cassert> using namespace std; int flipAround(stri... |
Feb 20, 2017 at 6:51am
[2 replies] Last: sure thanks for the hint, I'm gonna get rid of the asserts and give i... (by raminM)
|
by rkarim
Pointer in array problem
|
Hello guys! I am new here and joined recently to show my simple problem because I am having final exam this week. My problem is whenever I introduce pointers i... |
Feb 20, 2017 at 5:22am
[3 replies] Last: arr there is no need to declare additional memory if you're not goi... (by gunnerfunner)
|
by kikiyox77
Help with implementing linked list
|
So recently, I started to learn linked list in class and I am confused. She did a whole explanation and some examples, but it doesn't make sense. So for example... |
Feb 20, 2017 at 5:21am
[6 replies] Last: You seem to have the code skeleton but otherwise I can't see much of y... (by Pattako)
|
by parkhill
Creating linked list from virtual class
|
Hello, I am trying to create a linked list that includes two types of subobjects. I'm struggling to explain this. Basically, I have a vehicle class and I am ... |
Feb 20, 2017 at 5:06am
[4 replies] Last: I've tweaked some singly linked list code I posted last week (sorry ca... (by gunnerfunner)
|
by gohawks
int array to char array
|
How would I convert an int array to a char array? Basically, instead of it printing a value, i was s3 to be "D", s2 to be "V" and s1 to be "H" void init... |
Feb 20, 2017 at 3:58am
[3 replies] Last: You could loop over the data and convert, OR you could cast it. int... (by Bdanielz)
|
by kikiyox77
Singly linked list
|
So recent, I started to learn linked list in class and I am confused. She did a whole explanation and some examples, but it doesn't make sense. So for example I... |
Feb 20, 2017 at 3:54am
[1 reply] : http://www.cplusplus.com/forum/general/209044/ http://www.cplusplus.co... (by closed account 48T7M4Gy)
|
by L4R63N7
cout not working in For Loop
|
I found this code at tutorialspoint.com and wanted to tweak it a little. It is supposed to print all prime numbers up to 100. I copied and ran it in code::blo... |
Feb 20, 2017 at 2:03am
[3 replies] Last: Try this now: #include <iostream> int main () { const int UBOU... (by JLBorges)
|
by NICE8x
Class derived from a derived class
|
I figured it out. However a circle class can be derived from an ellipse class. |
Feb 20, 2017 at 1:22am
[2 replies] Last: Hi, A Circle is not an Ellipse and vice versa, so one should not i... (by TheIdeasMan)
|
by Sentoo
For Loop Help
|
Hey guys, I do not know how I go about doing things after testing out things with this code. If you guys could help me out, I would gladly appreciate it. #i... |
Feb 19, 2017 at 10:00pm
[9 replies] Last: Just an opinion, I'd consider ufrnkiddo's approach quite reasonable. C... (by Chervil)
|
How to turn off getline? |
I have an assignment where I need to extract data from a file using getline and write it to a new file. I got that to work, but now I can ONLY extract string v... |
Feb 19, 2017 at 8:00pm
[3 replies] Last: Sweet, I got it to work with my int variables. Doubles should be pret... (by givemeallthehelp)
|
The Average Of Three grades |
I need help with my program.I have already started it but can't finish the program.The user is to input three grades and find the average of these three grades.... |
Feb 19, 2017 at 7:53pm
[2 replies] Last: I found some ambiguities in the way you represent the scores (if the s... (by ufrnkiddo)
|
by Lars V
problems using string substr()
|
I am trying to make a program which divides a string into words and shorter sentences. I want "Word1 word2 word3" to be pushed in to an array like this: {Word1,... |
Feb 19, 2017 at 7:41pm
[4 replies] Last: Thank you! The initial idea was to do this with the find(), length() ... (by Lars V)
|
C++ Programming Help |
The initial output of my program is: Dear potential adopter: What is your full name? input random name What is the name of the pet you wish to adopt... |
Feb 19, 2017 at 6:44pm
[2 replies] Last: Thanks, it worked. (by StrikingSparrow)
|
by Tony321
External linkage doesn't work (1,2)
|
Hi, Facts: External linkage is make a type identifier visible in any translation unit. Non-static global variable has external linkage by default and stat... |
Feb 19, 2017 at 4:22pm
[21 replies] Last: It helps to note the difference between a variables definition and i... (by dhayden)
|