Beginners - April 2012 (Page 54)

What is operator overloading in classes?
 
Hello guys, I've searched for this topic everywhere and tried reading my textbook, but I simply can't grasp this issue. I know that operator overloading is u...
[4 replies] Last: Thanks a lot guys, specially vlad! you explained it real nice.. I thin... (by emperorvinayak)
by EeAA
reverse linked list function
 
Can you please check my reverse linked list function? does look okey? thanks. void ReverseLinkedList (nodeType *first) { nodeType *q,*r,*s; q=first; ...
[1 reply] : I do not like your variable names. It is difficult to understand what ... (by vlad from moscow)
find the smallest word in the string. revise.
 
hi everyone, my old thread became old, but im here with another plea. i have to re-do the program without utilizing any external libraries in the code. i have ...
[11 replies] Last: What is it ? s[*p]; *p is some symbol in your string. You use th... (by vlad from moscow)
by Jonn
Issues with Pointers
 
Hello, I'm having issues with pointers, specifically pointing towards a class named "game" containing a function to return a private variable with the class nam...
[5 replies] Last: You return a copy of DefPly in getPly() when you should be returning... (by Athar)
Having trouble with function to write output to file
 
I'm working on an assignment that deals with inheritance and a heterogeneous list. The program is supposed to read in the contents of a file, which consists of ...
[2 replies] Last: The derived classes could be thought of mathStudent, englishStudent...... (by deeburt)
[question] Constant
 
With the const prefix you can declare constants with a specific type in the same way as you would do with a variable: const int pathwidth = 100; const char...
[2 replies] Last: Yes, that is why it is called a constant . (by LB)
C++: When to use For Loop & While Loop?
 
Hi, I have just started implementing loops into my programs. Therefore I am wondering if someone can provide me examples of perfect situations of when to use Fo...
[2 replies] Last: For example, while loop: size_t strlen( const char *s ) { size_t... (by vlad from moscow)
errors creating my first class
 
Need some help figuring out how to fix this. I created my first class, and I'm unsure how to stop the error messages. This program is designed to make take a nu...
[7 replies] Last: You should start with this: #include <iostream> using namespace std... (by Moschops)
Soldier C++ Program
 
There's 40 soldiers in a line, and you walk down the line, and kill every 10th soldier. How would you write a program to figure out which soldier is the last st...
[1 reply] : Make an array of size 40. Fill it with ones. Start at the beginning. ... (by Moschops)
undefined ifstream ofstream
 
On line 6 the compiler found fin and fout to be undefined. I tried calling by reference and no avail. Any ideas? #include <cstdlib> #include <iostre...
[2 replies] Last: #include <cstdlib> #include <iostream> #include <fstream> #include <... (by blackcoder41)
Give me feedback on my text based rpg. Any improvments I could make?
 
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main () { int ph = 50, eh = 50, patk, eatk = 7, pot = 2, heal, wep,...
[2 replies] Last: Also instead of system("pause") use cin.get(); (by Ch1156)
by klae
Storing Fibonacci's sequence in an array?
 
Hey I am having trouble storing fibonacci's number into an array #include "stdafx.h" #include <iostream> using namespace std; int main() { int Fi...
[1 reply] : #include "stdafx.h" #include <iostream> using namespace std; int ma... (by vlad from moscow)
_getch not defined Code:Blocks
 
Hey guys I am trying to use code:blocks on Ubuntu and when I use _getch(); to stop the console from closing I get not defined error. Usually in Visual C++ 2010 ...
[4 replies] Last: Oh i didnt know that. I have been using Visual C++ and I always have t... (by roketteere)
Inverted asterik triangle -- for(int digit = 1; digit < num-row + 1; digit++) I know it works, but why?
 
This is my code to create an inverted asterik triangle. It works just fine when I run the program. The problem is, I am a brand new student studying c++ and I ...
[1 reply] : It's just a math issue. say you enter 9 for num. Then it makes row 0, ... (by BHX)
by pjwasz
Comparing int arrays
 
I am creating a program to 1) Generate a random 10 digit account number. 2) Have a user enter an account number that needs to match the generated account number...
[6 replies] Last: That makes no sense. In your generation function you generate 10 nu... (by cire)
Viewing Variables in Visual Studio
 
I am running visual studio and trying to view my variable values during the debug session. I am debugging, then pausing the session (to go into break mode). The...
[2 replies] Last: If you're working with a release build, it's entirely possible those v... (by cire)
by Rei
Using arrays calculating mean and median
 
Hello so I'm having an issue with this program I set the user to input up to 20 grades once the user has inputted let's say 8 grades they can exit if the like o...
[no replies]
by zkype
Asking for array class constructor initialization
 
Dear all , As far as I read from the book, if you want to initialize or pass array in function you should have array size and array name . But in the followi...
[no replies]
unexpected results
 
void build_Matrx ( double , int &sizeRow, int &sizeCol ){ //int sizeRow,sizeCol; double element; double matrx1 ; cout << "Enter...
[1 reply] : In build_Matrx() you stored entered values into local matrx1 , afte... (by tfityo)
April 2012 Pages: 1... 5253545556... 66
  Archived months: [mar2012] [may2012]

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