Beginners - December 2014 (Page 46)

link or something, need help
 
Hi all, I need some little help getting my head out of this , my problem is I want to construct two classes. 1. Employee - name, salary, work ID ...
[4 replies] Last: so that only a single employee can exists, By this I meant class... (by closed account SECMoG1T)
Code always does code of if statement when it should also do else if.
 
So I'm trying to make this tic tac toe game change player after one player makes his move. To do this I wrote the player = 2 line of code at the end of if(playe...
[2 replies] Last: thanks, it's working now. (by marcin388)
How to access class elements using a non-member function?
 
I want to access class elements using a function that is not a member of class. I've written the the following code. I want to compare earth's and mars's circu...
[1 reply] : change signature of compare to be something like: bool compare(const... (by mutexe)
Sorted 2d Array, casting error's when calculating median
 
The array is sorted correctly. My issue is I'm receiving errors in the median calculation. In some examples it is mentioned that there is an issue with the elem...
[1 reply] : The error is quite clear: array subscripts shpuld be integers. What ty... (by MiiNiPaa)
Reading an input file
 
I am trying to read an input file onto my screen and am having issues doing it. I am just trying to ask the user to tell me the file they want to open. Then ope...
[4 replies] Last: The problem is on line 3: it is initializes count with 2 for each iter... (by coder777)
hailstone seri
 
i wanna write a program that gets the first number a seri and shows the other:like this input:4 in this seri the next number comes form the number before it,...
[2 replies] Last: thanks (by shoysm the programmer)
Passing arrays in functions
 
I'm trying to pass all the values stored in the array to another function. I'm fairly new to using arrays with functions so first of all I'm not sure if im doin...
[1 reply] : for you error http://www.cplusplus.com/forum/general/113904/#msg622050... (by ne555)
by k18522
Void Functions: Finding the total cost of a item
 
I missed last class on doing void functions because I got sick and im completely lost! ive being using the texts book example for a reference but its not runnin...
[1 reply] : Arguments passed by value and by reference http://www.cplusplus.com/do... (by ne555)
Flagging errors by returning an error code with given global const int variales
 
I am completely lost with in terms of how a global variable can return an error code with a global const int. So I wrote one function that basically acquires th...
[1 reply] : With integers, something like this: const int NO_ERROR = 0 ; const i... (by JLBorges)
Struggling with dynamically allocating an array within a class
 
I am attempting to create three different students using three different constructors and getting a error codes LNK2019 and LNK 1120. It may have something to...
[5 replies] Last: if(0 <= i <= num && 0<=s<=100) You cannot write conditions that way... (by LB)
Can't store Object into array correctly
 
I create a new object that holds an int: Item newItem(1); I can print out newItem's data: cout << newItem.getData(); (prints 1) I try to store it into an a...
[1 reply] : arrays are indexed from array[ 0 ] to array[ array.size() - 1 ] Se... (by Lachlan Easton)
linear search algorithm
 
this isnt the entire program, just part the part im having trouble with , in which i try to search for the values from array2 in array1 and display the position...
[9 replies] Last: haha wow i did not type that well, i meant search for the values from ... (by LATCH100)
Poniter On String
 
the output will be 'D3 Teknik Informatika' how to make the output will be 'Laboratorium Teknik Informatika'. please #include<stdio.h> int main() { ...
[2 replies] Last: [code firstline=5] const char *Address= "Laboratorium D3 Teknik I... (by MiiNiPaa)
How can i check if the user didn't input anything and just hit enter?
 
Is there a way to make cin NOT wait for an input? int main () { int choice; cout << "This program translates integers with magnitudes less than a b...
[8 replies] Last: #include <iostream> int main() { const char newline = '\n' ; ... (by JLBorges)
how to get float type array size
 
When I try to get the size of float type array, my complier keep sending me: sizeof on array function parameter will return size of "float" instead of 'float '...
[5 replies] Last: What does numPoints stands for? Isn't it number of points/length of ... (by MiiNiPaa)
Help with arrays as parameters
 
edited*
[2 replies] Last: Perhaps I'm missing something, but you have an array of points in the ... (by norm b)
Stack/Push/Pop help!
 
I have an assignment where I have to take a sentence and show the revere of it using a user defined library of stack. The header file contains: #ifndef S...
[7 replies] Last: I have figured it out, I used a while loop where the condition was whi... (by alex067)
Need Help With Square Root Function
 
I have been hacking at this for days and the issue is our professor is not letting use cmath. So his instructions for calculating the square root is to use a...
[3 replies] Last: so upon further inspection the formula seems to just be returning a va... (by techwonder)
by Masada
Big O Notation
 
I'm just working through some exercises trying to understand Big O Notation and would like to know if I have the correct answers to this. Any feedback is apprec...
[3 replies] Last: your code still is not properly indented. > But I'm not sure, that is... (by ne555)
Reading char from File to Array
 
Hello, I'm trying to read a series of char letters (one per line) from a file and into an array. For some reason, instead of reading the letters, it's just r...
[5 replies] Last: So, I had it checked out by one of our TA's. It turns out that somethi... (by RandomPersonWorking)
December 2014 Pages: 1... 4445464748... 55
  Archived months: [nov2014] [jan2015]

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