
please wait
by AphexBravia
Returning Strings?
|
Hi, Writing a very basic function that checks a password is correct, no checks for username of anything. Program works I just cant get the return message "Ac... |
Jun 7, 2013 at 12:20am
[6 replies] Last: Cheers, glad I could help. :) (by Thumper)
|
by Blank
Conditional expressions
|
i just wanted to double check if the code i wrote is right.i have to turn these conditional expression into if/else statements. total += count == 1 ? sales... |
Jun 7, 2013 at 12:13am
[3 replies] Last: @Chervil Should be parentheses around the condition There is no ... (by vlad from moscow)
|
by Blank
conditional statement
|
how do i turn this into if/else statement cout << (((num % 2) == 0) ? "Even\n" : "Odd\n"); |
Jun 6, 2013 at 11:58pm
[1 reply] : if ( num % 2 == 0 ) cout << "Even\n"; else cout << "Odd\n"; (by vlad from moscow)
|
by sakonpure6
Is using too much srand(time(0)); bad?
|
In my code I used srand(time(0)); more than once. In each of my functions I had it. So is that bad? or if i use it once will it for ever randomly generate nu... |
Jun 6, 2013 at 11:51pm
[4 replies] Last: alright thank you all for this helpful information! (by sakonpure6)
|
by Blank
conditional expressions
|
how would i write this in an conditional expression? .if (temp > 45) population = base * 10; else population = base * 2; |
Jun 6, 2013 at 11:47pm
[2 replies] Last: thank you :) (by Blank)
|
by edg13186
expected primary-expression before ‘unsigned’
|
Greetings, I'm new to C++ programming and have been studying it for a couple of days. I have run into a few problems, like all beginners, but have always been a... |
Jun 6, 2013 at 11:35pm
[6 replies] Last: you declare lista like lista lst; lst.something(); You were trying... (by giblit)
|
by Mizter M
being forced to use only one variable in function which needs two variables
|
Here's the error I get in Visual C++: 1>------ Build started: Project: testing stuff, Configuration: Debug Win32 ------ 1> testing stuff.cpp 1>c:\users\hp\d... |
Jun 6, 2013 at 11:09pm
[2 replies] Last: There are a few problems here. For example, line 68, this is a functio... (by Chervil)
|
by maksins
*= Operator
|
This might be a stupid question, but what does *= operator do? I have these two statements in the code: double NoverL = N/L; NoverL *= 1.0-Mratio(2)-M... |
Jun 6, 2013 at 10:45pm
[3 replies] Last: It's a compact way of modifying the variable on the left of the operat... (by Chervil)
|
by loai27
-1 IND
|
I am getting -1 IND for my output. I can't figure out what I did wrong. I am trying to calculate the batting average of a baseball player. //main #include <... |
Jun 6, 2013 at 9:39pm
[4 replies] Last: I'm saying you're not using the parameters fed to the function. And ... (by cire)
|
by olibiakos
Assertion Error
|
I keep getting an assertion failure with the following code. FieldBuilder field ("alexandria_city.dat", 40); //creating the object //Constructor Field... |
Jun 6, 2013 at 9:14pm
[2 replies] Last: That solved the issue. I'm just starting to learn C++ so I don't reall... (by olibiakos)
|
by otisphat80
Deleteing dynamic arrays
|
Hello every one I have a question that I am sure you have seen a million times but I am not wanting code. I am writing a dynamic array class for an assignment. ... |
Jun 6, 2013 at 7:30pm
[3 replies] Last: You're welcome :) (by MikeyBoy)
|
Pointer data types |
Why does pointer's declaraction needs an identified data types? If its ok (what I'm currently thinking) if not? I have a feeling that it has many reasons but my... |
Jun 6, 2013 at 7:22pm
[2 replies] Last: Also, without a type how would it know how much data to read when dere... (by dreyan)
|
by dhilchie
When to use dynamic array or a vector??
|
I am writing a program that deals with statistical math and passes a lot of number back and forth between functions. There are a lot of arrays that are being ha... |
Jun 6, 2013 at 6:55pm
[10 replies] Last: http://www.cplusplus.com/forum/beginner/103937/ (by BToven)
|
by dhilchie
Segmentation fault
|
I get a Segmentation fault when i try to fill this vector up this is literally my first go at using them so I cant figure out what I did wrong #include... |
Jun 6, 2013 at 6:20pm
[1 reply] : By default vector is empty and hold 0 values. Either do .resize() or .... (by MiiNiPaa)
|
by bintezohra
Equal Numbers
|
Hi, can any one help me making a code for detecting equal and unequal numbers entered |
Jun 6, 2013 at 5:58pm
[1 reply] : http://www.cplusplus.com/doc/tutorial/operators/ Have you written any... (by Pebble)
|
by piczim
Need to understand
|
I have been working through a C++ course and am making slow progress. I enrolled for a course and to my surprise found it to be Active C which is for apple Mac.... |
Jun 6, 2013 at 4:39pm
[12 replies] Last: I would like to really thank you for your help. Best wishes Rodney (by piczim)
|
by IWishIKnew
beginner-level problem... I think...
|
This has worked in the past... //eliminate the child from the list map<string, int> newpar = parents; string chil = child; for(map<string, int>::i... |
Jun 6, 2013 at 4:27pm
[5 replies] Last: Yes, but the the rest take it's place. No, they don't. You need to... (by firedraco)
|
by supercow
Developing a basic game but I can't generate "traps" properly
|
So I am writing a somewhat basic game as a project for my C++ class. I know you guys don't like homework but this idea was entirely my own and I've been workin... |
Jun 6, 2013 at 4:26pm
[7 replies] Last: Just a curious question, how did you learn all that? :o That must have... (by GoranGaming)
|
by tina123
generate 20 distinguish random numbers
|
I want to generate random numbers from 1 to 20. how can i do it? I did something like this . #include <stdio.h> #include <stdlib.h> /* function main... |
Jun 6, 2013 at 4:06pm
[5 replies] Last: use can use shuffle algorithm to randomly rearrange the numbers 1 to 2... (by abhishekm71)
|
by a967Bytes
C++ Draw Diamond
|
why always my codes are complicated? This code is to draw a diamond using C++ the code is working fine, but I need tips to make more simple codes #inc... |
Jun 6, 2013 at 3:29pm
[4 replies] Last: Wow, I kept tracking this topic from the second I posted this problem ... (by a967Bytes)
|