Beginners - April 2014 (Page 39)

by toast9
friend stand alone functions
 
how do you write a friend function for a class that is a stand alone functions and whats an example of using it? is it something like this in the class? ...
[no replies]
constructors
 
I want to add the following to my code. But not sure how to do it. A default constructor User defined constructor #include <iostream> using name...
[6 replies] Last: seriously, i don't think there's should be classes for a calculator p... (by MikeyBoy)
Could someone please tell me what is wrong with my program?
 
When I am running the program, it doesn't display the results I want. It seems like it is not running though the male_calculation and female_calculation functio...
[9 replies] Last: Now you get to learn how to debug. Step through your code using y... (by AbstractionAnon)
error in coverting from decimal to hexadecimal
 
I'm trying to write a program that covert a hexadecimal number to a decimal number, but i don't know what is the error (a logical error) in this program, any he...
[7 replies] Last: oh! I I thought that it is the same! thanks for helping, problem solve... (by m7md389)
a program for displaying high and low number using do while
 
i'm trying to find out the highest and lowest number.. but compiler shows negative values in output when i enter a large number i.e 01234556 #include<iostrea...
[6 replies] Last: thank you (by Ayesha Irshad)
by adrien
Need Guidance
 
Title: Bank Account System Description: You are required to write a program for a bank account system. In the system you need to maintain the bank custome...
[9 replies] Last: line 89: You've created a function declaraton, not a function call. ... (by AbstractionAnon)
Stringstream doesn't pass value (skipping?)
 
I got this problem once but with std::cin. Down below is my program. And the input is: 4 1 4 3 2 5 2 3 4 5 1 1 1 0 The problem was at line 24, the while...
[2 replies] Last: Let me explain it to you. Here if I replace all the getlines/stringstr... (by dleanjeanz)
Change letter to word?
 
Making a basic code that just asks you to type in a letter. Then says You Typed In (Letter) !. Curious to know if there is a way to make it accept a word? This ...
[3 replies] Last: Yes. First, use strings, it is much easier (and there is no limit that... (by TwilightSpectre)
code for finding number of accurrences in arrays
 
what should be the code for finding number of occurrences in arrays?
[3 replies] Last: thank you (by Ayesha Irshad)
Triangles...
 
//can you tell me where the problems are? //this function should set the sides and the corresponding angles of a triangle, and also the area and the perimeter ....
[5 replies] Last: yes, I've just done the translation from java, you know... i can't fin... (by closed account jvqpDjzh)
Code::Blocks 13.12 Not allowing projects to be saved.
 
I recently installed the newest version of Code::Blocks. I create new C++ projects using all the defaults except using them as *.cpp files instead of *.cbp. Eve...
[4 replies] Last: Ahh. But I guess that just confuses me because my book and every c++ ... (by MikeyBoy)
Help with the code.
 
Hi, Im writing a code to read data from a file and store them into individual objects of a class. //Bikes.Txt R15$80000$Yamaha$25$18$150 CBR250$200000$H...
[9 replies] Last: The third argument to getline() should be a single char, not a strin... (by MikeyBoy)
homework help needed
 
I am getting error ERROR: error C2065: 'smallCups' : undeclared identifier, I have listed it in the code where I get it and I have added relevant code to show w...
[2 replies] Last: Change int size1( int smallCups ) { int smallCups and accordingly: ... (by coder777)
by Matas
pointer
 
hello, i need to find the least number in the file by a pointer. If the least number in the beginning of the file the program does not find it. Write your tip...
[3 replies] Last: As a suggestion, if you really want to use pointers and dynamic memory... (by nvrmnd)
Newebie: Switch case statements inside a function??
 
Dear experts, I would like to declare a function whose output is not an integer, this function actually shall convert an Integer number to some predefined stri...
[4 replies] Last: Bundle of Thanks Members, your suggestion meant a lot to me. I got the... (by luckyali)
by zdzero
Simple linked list with classes
 
I need to implement a Dynamic Array class that is represented using simple linked list. I have problems picturing this. Should I go with template<typename ...
[2 replies] Last: Thanks. In the meantime I tried to implement a linked list and an iter... (by zdzero)
Could someone tell me how to write this code
 
Write a program that reads an arbitrary number of integers from user, until he/she choose to stop the input. The numbers should be stored in a vector1 which is ...
[1 reply] : It is best if you try this and then come back to us with some code to ... (by Mats)
using if statement to print the largest/smallest values
 
Write your question here. so, this is what i have. i wanted to include it all because i don't know what people need to see in order to tell if i have put things...
[3 replies] Last: I think you need to add this piece of code in the while loop where you... (by anmol2701)
by toast9
strcpy string to char array
 
I want to change a string into an array of characters. After looking around online strcpy came up the most, but I can't get it to work. class PlayerColors...
[19 replies] Last: post code please for the cin occurring right before this function is c... (by closed account 2UD8vCM9)
Trying to change number to letter.
 
So I am trying to learn the basics of C++ before the gameduino comes out. I want to just learn the basics. Anyways I was making a code that just asked you for a...
[2 replies] Last: omg... Now I feel so silly. So I could name cha anything I want. The i... (by HeroesNeverQuit)
April 2014 Pages: 1... 3738394041... 67
  Archived months: [mar2014] [may2014]

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