Beginners - April 2015 (Page 18)

by oseri
Cant figure out constructor/operator calls
 
In this code : class A { public: A(int n = 0) : m_n(n) { } A(const A &a) : m_n(a.m_n) { } A(A&& rval) : m_n(rval.m_n) { } A& operator= (A&& rval) { } A...
[3 replies] Last: So are these lines equal ? : Yes, it wouldn't make sense to create an... (by coder777)
by alexBB
Looking for help in explaining two code lines
 
I am facing a problem of converting the code below to Fortran. I've done such things before successfully but this one is a bit challenging. The code is taken fr...
[2 replies] Last: Thank you. It seems to have become clear now. - Alex (by alexBB)
by enemy
arguments of the class function
 
Hello! Please, constructor has agruments but sum function not. Is there a definition that makes it clear? Many thanks!!! #include <iostream> using na...
[5 replies] Last: What moment? (by keskiverto)
by enemy
Friend can't see private members?
 
Hello! Please, function mmm is ment to be a friend function. So, it shoudl be able to see a and b, even though they are both privete, isnt it? Please, just ...
[3 replies] Last: Solved! Done! MANY THANKS!!! (by enemy)
by snippo
how can I avoid the duplication of the customer name???
 
the question is  Open the file (CUSTOMERS) that maintains all the CUSTOMERS records.  Ask the user to enter the required data Cust.Name, and then save i...
[5 replies] Last: http://www.cplusplus.com/reference/set/set/count/ (by keskiverto)
Deleting number from array using a loop
 
This code returns: array size is: 3 1 is present in the array 1 2 3 1 0 I want the code to return this: array size is: 3 1 is present in the array 1 2...
[3 replies] Last: For line 48 I don't know what forgetting the size of the current arra... (by keskiverto)
Problem with first character of a char variable
 
Hello! I need to count the number of times vocals appers in a text, but when I do this with the following code, it takes the first character as null (or at l...
[1 reply] : The size of the array numar is 9 not 10. I.e. i < 10 will go out... (by coder777)
Help with strings and array......
 
Say, I make an array of playing cards called Deck from a structure, and then below main I initialize string faceValue ={Ace, Two, Three, Four, Five, etc....}. ...
[2 replies] Last: This is of course an implementation of one of my last threads, but rat... (by ZeroSploit)
Collision Detection of Multiple Objects
 
This is a very general question and seemingly a basic one at that, perhaps so much so that it's just not discussed that much, but it's been eating at me. The ba...
[1 reply] : use an octree, They are straight forward, i wrote one myself last yea... (by Jaybob66)
by ahu
plz solve this
 
Write a C++ program that contains the following: 1. Function that reads an array of 5 integers using rand function in range [50,100] 2. Function to print arra...
[1 reply] : This is not a homework service. We will help you with your assignments... (by Zhuge)
by kunz
Random
 
i have a code like this but it does not seem to work int randomin(void){ const int MAXINT = 10; const int MININT = -10; int a = 0; ...
[4 replies] Last: We can't really avoid implementation-defined behaviour; for instance,... (by JLBorges)
The return operator doesn't return a value;
 
Why can't I print the value of 's' with return.I don't want to do it with 'cout'. #include <iostream> using namespace std; int s; int surf(int a, ...
[1 reply] : return doesn't print anything; it does only what it says: returns th... (by Zhuge)
by Gohmer
Help w/ Shifting Arrays to Right
 
Hi I'm trying to write a program that assigns random numbers to an array and then shifts the numbers in the array one unit to the right and returns the last num...
[1 reply] : Note that you assign a value to temp on line 12 from list[MAX-1] . ... (by cire)
C++ unsorted linked list.
 
Hello. I'm looking for some help. My task is to find if there are any duplicate values inside unsorted linked list. So what im trying to do here is, to compa...
[1 reply] : On line 9, add && pOne != pTwo to make sure you're not comparing a n... (by fg109)
Help With LList and Listnodes "Hexadecimal Numbers"
 
Ive been having issues with my hexadecimal converter for my class. Its made with LList and listnodes. As of now my program can add and multiply single digit cha...
[1 reply] : http://www.cplusplus.com/forum/beginner/161656/ (by fg109)
IFstream problem
 
Hello guys.I want to save numbers ,that i put in when cmd opens, in notepad but there are always false numbers.Here is my code: #include <iostream> #in...
[3 replies] Last: Ah! The problem is line 18. It should be cin >> pol ; ("a", not "x"... (by dhayden)
Have Some Q's About HW. Code included.
 
My C++ teacher gave me some part of the code because many of us were stuck. Here was the assigned project. Example 10- 10 defined a class personType to sto...
[1 reply] : All you need to do is check whether any given name is equal to the per... (by Militie)
by HG319
choosing the correct sorting algorithm
 
Consider an array of length n containing positive and negative integers in random order. Write C++ code that rearranges the integers so that the negative integ...
[1 reply] : Yes. http://bigocheatsheet.com/ (by Militie)
Recursive Binary Postfix
 
Hello everyone, I'm trying to evaluate binary postfix recursively. For simplification purposes, it only needs to work for single digits. I have no idea h...
[no replies]
How to do this project
 
ASSIGNMENT 2: Using a loop and a storage variable, output a text file with the Student, Exam, and Part values lined up in a column. Example of output: Studen...
[1 reply] : Is it the text file output that is confusing you? http://www.cplusplu... (by Militie)
April 2015 Pages: 1... 1617181920... 52
  Archived months: [mar2015] [may2015]

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