Beginners - November 2012 (Page 68)

by modic
/n Won't work >.>
 
Everytime I try to use /n it always displays as "/n" Example: #include <iostream> using namespace std; int main() { cout << "Hello /n World!";...
[2 replies] Last: I just derped... (by modic)
Loop program for card game
 
Please, help! i have to write a program that uses the 2 functions to repeatedly set and display the values of 2 random cards until 5 of the card pairs compa...
[2 replies] Last: @ladybug21 You could use a int variable with an example name of high_... (by whitenite1)
Cout scope issue
 
I am having trouble with cout. In my main function it kicks the ouput to the console like it should. However, when I call it from a function or method the out...
[3 replies] Last: Guys, Thank You very much for the help. The article above helped. I ... (by jwott1965)
by modic
Which one is better? (VSC++/C::B)
 
Which one is better? VSC++E2012, or C::B? (Visual Stuio C++ 2012, or Code::Blocks?) Please help me I don't relly know. I belive Codeblocks is better but I re...
[4 replies] Last: I'm felling more comfortble with VC++. Code::Blocks is too.... differe... (by modic)
Changing lowercase to upper case letter and Vice versa (1,2)
 
Hi guys I need help with how to create a function whose input is a string. The function has create a new string from old one by changing all lowercase letter to...
[24 replies] Last: Like Hotice and LB are saying you need to look at the advice and resea... (by closed account 3qX21hU5)
by se67en
Call a void function in a cout statement
 
Hi! So in the main function, I want to call the void function Test(), but it seems like i"m unable to call it. Is there another way to do this and keep the fu...
[4 replies] Last: Thank you everybody! This is really helpful! (by se67en)
Need help reading in string with getline()
 
Hi, I'm trying to read a line of text from a file into a string variable. The easiest way I could see to do this was (I thought) the getline() method, but when...
[1 reply] : The std::iostream::getline() methods are not std::string friendly. The... (by Duthomhas)
const
 
Hi, I have a method that adds two rational classes. I don't understand the purpose of second const. I know the first constant is initializing the constant ra...
[2 replies] Last: Non-static member functions have implicit parameter of type SomeClass... (by vlad from moscow)
passing array into class by reference, having trouble with function and calls parameters
 
i dont really know where to put the arguments in DE_EDGE(the idea is to stop chars falling of the board), i managed to pass an array to a function before but it...
[3 replies] Last: good eyes i might add (by devonrevenge)
(Please Help) Parking Garage Functions
 
I don't know how to get the programs to call each other, please help me. #include<iostream> using namespace std; int intro() { cout<<"The first 30 minutes ...
[6 replies] Last: I updated my main function up top but idk how to get them to call each... (by GIjessiebear)
Making a hexagon creator
 
Hey guys, im writing a program that takes a user's input and prints out a hexagon based on it. i've nearly finished it but im a little stuck on two things the f...
[1 reply] : needed to ask different questions about same program and thought it'd ... (by Aalnius)
Correct my teacher (1,2)
 
This is a copy of my teacher's program that won't run when I compile it. Help me fix it so that I can finish my homework. // Lab12P1.cpp – Read dropout ...
[21 replies] Last: That's a good point, can you copy and paste exactly what's in your .tx... (by trynreadme)
'isblank' identifier not found
 
Hey everyone, I m trying to use the function isblank() that is supposedly defined within ctype.h. alternatively i include cctype, but still, visual studio tell...
[3 replies] Last: You could write the function yourself, it shouldn't be more than a cou... (by Chervil)
inheritance problem!!
 
In the below code i can't understand highlighted code... #include<iostream> #include<conio.h> #include<Windows.h> using namespace std; class A { protec...
[3 replies] Last: You mean change the value of a member B inherits from A? You can just ... (by Zhuge)
Comparison of arrays created from a class
 
I need to create a program that creates an array of a class object and then compares it to another array (both user input). I am having a problem calling and co...
[1 reply] : Your TestGrader has two arrays of size 20. You make two sets of TestG... (by Lowest0ne)
How to subtract numbers after decimal and place in new column?
 
Is there a way to take numbers after a decimal and put them into a completely new category? (i.e. the conversion of feet to meters. Typically it would result in...
[3 replies] Last: I would place the value 0.3048 inside the function. No point passing i... (by Chervil)
Rational(long n,long d):N(n),D(d)
 
A constructor is declared inside a class. but I didn't understand what N(n) and D(d) are. note that N and D are two private members of class Rational. does any ...
[1 reply] : It's initialisation. The effect is similar to this: Rational(long n,l... (by Chervil)
How do i find the max and min from a file using array and a loop?
 
#include <iostream> #include <fstream> using namespace std; int main() { //initialize my variables int Sum = 0; int Average = 0; int salesV = {}; ...
[5 replies] Last: Thank you so much for your help i will also help others with this prob... (by chikaibeneme)
by se67en
HELP! Can't correctly call my function
 
Hi! So I tested the function BrianTest below without the test function, and the output works. However, when I try to call the function below with the test fun...
[3 replies] Last: Moeljbcp beat me ...I wrote it below and it does work too..., guess a ... (by Kart)
Function Calling An Array
 
I am a brand new student to programming, and am trying to figure out how to do the following: Read X integers from the keybboard (set Maximum Number of input...
[3 replies] Last: The reason your code above doesn't get through the compiler is this fu... (by Moschops)
November 2012 Pages: 1... 6667686970... 75
  Archived months: [oct2012] [dec2012]

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