Beginners - October 2015 (Page 32)

problem with a function in my class
 
hi people! i am a beginner in c++ and i wrote this code this code is designed to get cordinates of 2 points and caleclute the lenght between those 2 points th...
[2 replies] Last: thank u sir that worked fine!! (by merdasss)
Function parameters in an if statement
 
Hi, is there a way to execute a line of code if the function is provided with 2 parameters and another line of code if it's provided with only 1 instead? Let's ...
[2 replies] Last: Thank you, that is what I was looking for. I'll go figure out how to u... (by DDomjosa)
Filling up array type char*
 
Hi, I'm trying to pass char* and char* arr to a function where they will be parsed... #define MAX_LINE 80 void parseInput(char* args , char* input) ...
[5 replies] Last: args is array of arrays. No it is not an array of arrays until you ... (by jlb)
by sme97
Functions
 
I have wrote the code below and used functions to print an array and sort it from smallest to biggest. For some reason the numbers are not being sorted what cou...
[1 reply] : Your sort algorithm is not implemented correctly. Is there some reason... (by LB)
by sme97
Functions
 
I wrote the below code with functions to print and sort the array from smallest to biggest. The numbers are not being sorted, what could be the reason behind it...
[1 reply] : Please do not post more than once: http://www.cplusplus.com/forum/begi... (by LB)
loop from input text file
 
I am having trouble performing a loop from an input text file, here is what I have so far: //preprocessor directives #include<iostream> #include<fstre...
[no replies]
Structure troubles
 
Problem; Total Sales and Average Sales displayed by program are coming out as negative values. Prompt; 10. Corporate Sales Data Write a program that uses a st...
[3 replies] Last: and the reason that you get negative numbers when you pass the data by... (by dhayden)
by esolve
multiple definition of variables in global.h
 
I have some variables which are used in different source files. so I create a global.h and put all variables in the header file. using namespace std; #ifnd...
[4 replies] Last: if I should not use global variables, then what should I do? Make th... (by jlb)
Multiplication table
 
Write a program that displays a multiplication table. Ask the user for the ending number then display table. For example: Enter a stopping number: 3 1*1=1 1*2...
[5 replies] Last: If you're truly lost, and can't even figure out how to start, here goe... (by Michael5)
undefined reference issue
 
I am in a pickle. I keep getting an undefined reference error in any member function or friend that calls the constructor. This is snippet of the errors I a...
[4 replies] Last: return a reference with the operator + . add the member to this memb... (by dhayden)
const vs. #define
 
I was wondering, because of the difference between defining "const" and setting "#define". Just trying to understand how the compiler goes about. "const" wou...
[17 replies] Last: Your code on line 1 is invalid. (by LB)
Text output not in rows
 
Hi guys, I'm trying to print a table of data to a text file, but all the data is printing on the same line, even tho I've used endl. while(abs(fun(x))> ac...
[4 replies] Last: Thanks alot that was very useful (by footpot)
Reading a file and outputting to new file
 
What I am wanting to do is take the data from the third and fourth columns of this document: 1 Crosby 42 82.13 2 Stills 23 100.11 3 Nash 40 14.21 4 You...
[3 replies] Last: stupid me that uses stdin/stdout the_input = open('input.txt', 'r') ... (by ne555)
Not sure if i nailed it
 
Last time i needed help this was the best way i got help from, there is so many smart guys in here, so i need some help now. Write a program using classes th...
[1 reply] : [quote=jhsyber]What am i doing wrong? Please explain what makes you th... (by LB)
Visual Studio (C): Debug Assertion failed; .exe has triggered a breakpoint
 
Hello. I am doing an assignment for my Intro to Programming class. Our instructor provided us with the start of this program, and we were assigned to finish it....
[9 replies] Last: I get compile errors with what you posted. Lines 10-14 all need to be ... (by AbstractionAnon)
Making a multiplication chart/table
 
Write a program that displays a multiplication table. Ask the user for the ending number then display table. For example: Enter a stopping number: 3 1*1...
[3 replies] Last: I'll give that a go, and also thank you for the tip! Didn't mean to ma... (by ianheinze)
I'm having a problem with my HW "Dice Roll"
 
I'm supposed to write a code using an array in order to tally up how many times each face of the die shows up using the variables (they're from a pseudocode). I...
[13 replies] Last: You've mentioned it only once. Sorry. You did have multiple messag... (by AbstractionAnon)
by C0UG3R
C++ Class Constant Defining
 
I'm writing a program for a class where I have to make a stack and do some stuff with it. I got it all done and it runs fine when I compile it, but I'm getting ...
[4 replies] Last: as long it is not static you can. (by Ericool)
by Dazzer
General question about operator overloading
 
Hi folks, At the moment I'm learning about operator overloading. I think i have more or less got my head around the concept. Although it strikes me as...
[4 replies] Last: Hi, Surely you can figure that out ? Given a function add (a, b) w... (by TheIdeasMan)
Inventory Class returning a negative inventory
 
Problem; Item Number (identification), Quantity, and Cost of item are all displaying large negative values at the end of program. Prompt; Design an Inventory...
[9 replies] Last: I know I need to call the setTotCost function, this is why the TotCos... (by cire)
October 2015 Pages: 1... 3031323334... 57
  Archived months: [sep2015] [nov2015]

This is an archived page. To post a new message, go to the current page.