Beginners - December 2016 (Page 21)

by Edyson
Matrix
 
Using standart <iostream> library, if someone could help me, I would be appreciate. Here is exercise: Check whether a given matrix A (m, n) is symmetrical to t...
[no replies]
Help me with my project
 
Hello. I have two files. One with ID, Name and Surname of employee and secund one is with their ID and number of hours in each day they work. I need to sum th...
[7 replies] Last: Sorry, but im realy stupid in programing. I think abouth this. thi... (by Jakubaz)
Most occurring element in vector<int>
 
As the title say how do I get the most occurring element. I sorted the vector because I thought it would make things easier, but maybe that was unnecessary. ...
[2 replies] Last: > I sorted the vector because I thought it would make things easier, b... (by JLBorges)
Need to change from max value to average
 
Hi!! i did a program with array and with funcion to find a max value ( got help with it a little) now i need to do the same one only to calcuate the average us...
[3 replies] Last: Well, I was hoping you would modify the function, rather than main(). ... (by Chervil)
Passing class name as arguments to member functions
 
I'm having issues with the last part of my code. I have to add the declaration of void multiply(Fraction,Fraction); to my Fraction class, but when doing so, I...
[18 replies] Last: Are you saying that's what I need to do? That would give the wrong ans... (by Guy1988)
reading file from last position
 
Hi The code successfully reads a file, line by line, up to a certain point, then does some processing. The code should restart reading from the line, one line ...
[1 reply] : Well, if you don't use break at line 22, it will continue processing... (by Chervil)
Array Question
 
(first of all sorry if i make any mistake on my english) Well I'm new at programing , and the first and only language i can so far is c++ as i was learning Arr...
[3 replies] Last: #include <iostream> #include <numeric> using namespace std; int main... (by lastchance)
Arrays
 
Hello, I'm learning about arrays in c++ and have two questions. I have created this program that's randomizing numbers between 1-100, but somehow the last outp...
[4 replies] Last: I've limited the range of your random numbers to 0 - (RANGE-1), that i... (by lastchance)
Question regarding reading a file into an array using a while loop
 
How do I use a while loop to read the file into the names array? I know I'm supposed to use getline() to read each name but I'm unsure how to approach the probl...
[1 reply] : #include <iostream> #include <fstream> #include <string> using namesp... (by lastchance)
how to use a using
 
Hi I have a structure defined as an adjacency_list in the private section of a class. I would like to use adjacency_list in a print function, but I'm getting...
[3 replies] Last: Hi JBroges thanks for the help. Works! (by bluefrog)
More in depth explaination of inline funcs?
 
I am in the process of learning C++ and I have come to learning inline functions. I know their purpose and when to/not to use them, but I don't completely under...
[2 replies] Last: That is much simpler that I was imagining; your example really clears ... (by cmhubert)
Search in array
 
I'm playing around a little bit with arrays. At the botten of the code I'm searching for a specific number that the user input. It works fine but it only shows ...
[6 replies] Last: Regarding flush/endl with file output. Normally I would avoid using e... (by Chervil)
by mgala
Simple question regarding operators
 
Hello I'm writing a program which runs a lot of functions that run based on the user inputted menu choice which I will not be including. My question is why is t...
[4 replies] Last: I assume you have closed the other one down. It would have made sense ... (by closed account 48T7M4Gy)
Calling functions
 
Write a statement that calls computeMajorGpa and assigns the result to gpa. Note that this statement is part of the printMajorGpa() member function for Student,...
[1 reply] : Maybe something like this ... double gpa = computeMajorGpa(); ... (by Peter87)
Create a variable number of files
 
Hi guys! I need to write a short script that creates a variable number of output files according to the conditions I set. My problem is that my script only ...
[2 replies] Last: Oops! You're right! Thanks! ^_^" (by amivaleo)
making a queue of c-strings
 
I need to create a queue of c-strings, but when I push a new c-string onto the queue, all the items in the queue appear to point to the same c-string. In this...
[1 reply] : You have only one buffer for the input so you overwrite it every time.... (by Thomas1965)
by mgala
Desperately need help with functions and arrays
 
Hello, can someone explain how functions and arrays interact? Specifically, I am writing a program where I need to use several functions, each of which takes a ...
[10 replies] Last: http://www.cplusplus.com/forum/beginner/204040/ Don't double post and... (by closed account 48T7M4Gy)
Dynamic Array and [] operator overloading issue.
 
Hello, I need some help from experienced folks on this dynamic array I'm creating. I'll get straight to the point. My program asks the user to enter in the init...
[10 replies] Last: And here is another example from "Data Structures and Algorithm Analys... (by closed account 48T7M4Gy)
Does "unique" function work in vector<char> ?
 
I thought to find unique elements from a string data is straightforward. But it turned out to be not! The "unique" function definitely works well on vector<...
[4 replies] Last: Thanks. So the answer is to sort the string before unique it. (by landlord2017)
using a swap function with pointers to array as parameters
 
can someone explain if im doing this right? i need to use pointer artimetic to change the 3rd element with the 16th element swap(int*p, int size) { ...
[1 reply] : Please use code tags. http://www.cplusplus.com/articles/jEywvCM9/ ... (by integralfx)
December 2016 Pages: 1... 1920212223... 28
  Archived months: [nov2016] [jan2017]

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