
please wait
by lovescompsci
Moving data from an array of strings to a struct
|
So I've got a struct that has the coordinates of a triangle like this: struct Point { double x; double y; }; struct Triangle { Point a, b, c; str... |
Nov 18, 2015 at 11:55pm
[1 reply] : Use the string stream class (sstream). Then you can read data from th... (by dhayden)
|
by newlearner99
For loop
|
I want to create a for loop which contains an equation, where one variable changes each time the loop runs, and alos with an if statement to find a minimum valu... |
Nov 18, 2015 at 11:51pm
[1 reply] : Please use code tags when posting. Highlight the code section of your ... (by dhayden)
|
by antonyt
return pointer of an array
|
I keep getting this error " invalid conversion from 'int*' to 'int' [-fpermissive]", I have tried everything and still cant fix the error. Any hints? #inclu... |
Nov 18, 2015 at 11:16pm
[4 replies] Last: wow thanks, silly mistake . (by antonyt)
|
by etrusks
return *this
|
Hi, Im having problems understanding why do some member functions like complex& operator+=(complex z){ re+=z.re; im+=z.im; return *this;} is using reference ... |
Nov 18, 2015 at 10:16pm
[2 replies] Last: This makes sense and looks really useful. Tnx a lot :) (by etrusks)
|
by jframe1734
function/array problem.. ugly code
|
hw plz help! I've wrote this awful code and I'm just interested in what may look wrong or inefficient, we're going over FUNCTIONS and ARRAYS in class right now ... |
Nov 18, 2015 at 9:42pm
[3 replies] Last: #include<iostream> double calcavg(double , int); int main() { doub... (by closed account 48T7M4Gy)
|
by dmw
Not understanding functions
|
Hi all, I'm new here to the forums but I've taken a look at the references and tutorials in the past. I was hoping to avoid going to the forums for help but ... |
Nov 18, 2015 at 9:30pm
[3 replies] Last: Some problems with your original code: line 34: Why are you compari... (by AbstractionAnon)
|
by areyouennay
Program Freezes when reading from file
|
My program keeps freezing at the readData(extra) function. I've commented it out, and everything else is working the way I want it to (or at least I think it's... |
Nov 18, 2015 at 6:43pm
[1 reply] : You need to show where info , SIZE and EXTRASIZE are defined. A... (by Chervil)
|
by fguy
Problem overloading input operator
|
Greetings. This one has me stumped. So it's probably something obvious! I am trying to overload the input operator using a friend function. I have managed to tr... |
Nov 18, 2015 at 6:35pm
[1 reply] : never mind I found the problem. I can't make the Point parameter a con... (by fguy)
|
by jhsyber
New to Everything lol
|
So I am having trouble understanding my professor, would you write this in other words please? I am new to c++ and to english. What is a Driver Class? The foll... |
Nov 18, 2015 at 6:30pm
[1 reply] : What is a Driver Class? A driver is usually a function/program that... (by jlb)
|
by Marth
HARD field on soft input.
|
so im writing a code that asks user to input birthday. Out of sheer curiosity, I want to know if its possible to create a static field in which the user inputs... |
Nov 18, 2015 at 6:28pm
[no replies]
|
by keanedawg
Should I initialize my data in the class definition or in the constructor.
|
Certain pieces of data will always be initialized to the same value, regardless of the constructor called. Sailor::Sailor() { this->health = 25; ... |
Nov 18, 2015 at 6:09pm
[4 replies] Last: I always write an Init() function that all of my constructors call./q... (by Computergeek01)
|
by newlearner99
inserting values into arrays from equation
|
Hi there Im looking for some help with my problem. Is it possible to put values for y from my equation into a new array, so I can then use this and an origin... |
Nov 18, 2015 at 5:19pm
[5 replies] Last: Look at line 4 of the code in part 2 of my first answer. Also, line 1... (by Kevin C)
|
CHARACTER ARRAY- ACCEPTING WHITE SPACE CHARACTERS |
#include<iostream.h> #include<conio.h> void main() {clrscr(); char name ; cout<<"\nEnter your name.\n"; for(int i=0;i<15;++i) {cin>>name ;} cout<<"\n\n"... |
Nov 18, 2015 at 5:19pm
[1 reply] : [quote=OP]... my teacher has asked us to use the basic logic and not t... (by Computergeek01)
|
by Jon15
Creating a quiz with classes
|
I am having troule implementing part of my class for a quiz program that I created. I am having two problems: firstly being that I can't open my .txt file for t... |
Nov 18, 2015 at 4:54pm
[4 replies] Last: Fixed the hitting enter to get the answer problem for both; still wor... (by Jon15)
|
by jgg2002
All possible sums
|
So my questions is, how many possible groups of 3 numbers, can have a sum equal to a number, lets say N. Can you explain some sort of algorithm, I don't need c... |
Nov 18, 2015 at 4:39pm
[4 replies] Last: No, sequence doesn't matter. a=1, b=1, c=2 would be the same with a=2,... (by jgg2002)
|
Generate Sound (Beeps) ?? |
Hello everyone,, I'm confused about this question! Please, I need your help .. Q: Use the time function to generate 5 Beeps every 10 Seconds for 3 Times... |
Nov 18, 2015 at 3:20pm
[3 replies] Last: Well... What have you tried??? Have you looked at sleep() functions? ... (by cnoeval)
|
by Arslan7041
Minesweeper Game (text based, no graphics) - help
|
Im trying to make a minesweeper game. It will not have any graphics, but be entirely text-based. Right now, Im just trying to form the grid. Here is what I ... |
Nov 18, 2015 at 1:42pm
[3 replies] Last: I've improved by code a bit but I need some help. Here's the thing: ... (by Arslan7041)
|
by theseus
full precision double
|
I am calculating Min and Max of a vector of type double. Below is the kind of data i have. I am using Max_Element and Min_Element to automatically find the min ... |
Nov 18, 2015 at 11:11am
[2 replies] Last: It worked! Thank you so much JLBorges. (by theseus)
|
by lioncyber97
input as function
|
Hi , i'm confuse about function thing normaly , a normal function is Math_plus(int a,int b) then a + b something ... now, instead of asking user for input ... |
Nov 18, 2015 at 7:12am
[3 replies] Last: this trick is cool but hard i would rather switch back to if condition... (by lioncyber97)
|
by BaloneyOs
Using same Index function for different Sort functions
|
Hello all! I created a small practice program for practicing sorting data that is read from a file. The problem I ran into is that when I want to sort a diff... |
Nov 18, 2015 at 7:11am
[2 replies] Last: The template one works, thanks! And yeah I was lazy to just use l (L) ... (by BaloneyOs)
|