Beginners - March 2014 (Page 46)

MAX ARRAY
 
Write a function called matrixMax that returns the largest element in a matrix of doubles , with numRows and numCols. A function definition skeleton is provide...
[11 replies] Last: thanks for everyone's help! The final answer that is correct: doubl... (by IMNOTGOODATCS)
Do-while & Switch
 
At end of do-while, I would like user to be able to run through switch again. If user enters 1, it should go back to switch menu If user enters 2, program shou...
[7 replies] Last: @MikeyBoy I see ... I was assigning 1 to the int variable runAgain. ... (by sportstool)
Calendar
 
This is an exercise that i am working on. The program is supposed to display the calendar of a month after the user has inputted the month and year. But i canno...
[1 reply] : http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week (by MiiNiPaa)
by enemy
What means error: prog.cpp:44:8: error: invalid conversion from ‘int’ to ‘int*’
 
Write your question here. #include<iostream> using namespace std; int* pus(int b){ int top; int max; max=5; ...
[1 reply] : www.cplusplus.com/forum/beginner/125974/ (by MiiNiPaa)
error LNK 2019 unresolved external symbol
 
How do I resolve this error LNK 2019? I think it means the compiler cannot find something........1>measurement.obj : error LNK2019: unresolved external symbol "...
[1 reply] : Line 50. Tell me where is body of output function located? (by MiiNiPaa)
by FatS
Coursework Help
 
Hi, for my second semester coursework we've been given a piece of code which is a darts game between two players Joe and Sid. Here is the code we were given :- ...
[no replies]
by whilom
UVA 10189 help
 
I tried to solve UVA problem 10189 and the test cases were all correct but for some reason, it is still marked wrong. Can someone please check the code? Than...
[7 replies] Last: As I said, that task is difficult and time consuming, so I rather don'... (by ne555)
constructor vs setName()......
 
Here is my question... class apple{ private: string name; Public: apple(); apple(string a); // to set name=a; void setName(string a){ //to set name...
[2 replies] Last: thank you very much.... (by americanxo)
Trouble with outputting
 
I am trying to write a really short and sweet program to compare two strings, nothing too inclusive even for a beginner. However I'm having a bit of trouble get...
[no replies]
by enemy
class: sort coutput by element (member) value
 
Hello! Please, is it possible to sort this output by ID value, so that we put ID value in a loop? How would be the syntax? Many thanks!!! #include<iostream> ...
[3 replies] Last: oops, sorry MiiNiPaa I didn't refresh the post before posting hence a... (by Codermik)
by mow213
savings acount in a loop
 
im trying to learn c++ for the first time and have difficulties with a program where the user writes how much he wants to put in each year, what saving goals he...
[1 reply] : I have spotted an error in line 20 total+total; // You don't give th... (by jasongog24)
Clang will not allow this type of initialisation
 
I get this error: http://postimg.org/image/eixljzmqx/ vector<int> i{1,2,3,4,5,6,7,8,9,10};
[4 replies] Last: That was too little code to reproduce your error message. Here's a com... (by Cubbi)
Sorry if this is old
 
I am trying to write a mortgage calculator for my C++ class and I can't figure out what is wrong. Cost is: $123,500 at 6.5% interest with 10% down. This is wha...
[2 replies] Last: I think you want to multiply the price by the down payment percentage ... (by wildblue)
static variable won't iterate within class func
 
I just created a static variable within the function defination of one of my class members of my header file. I tested it with cout << pos_offset to see if ...
[3 replies] Last: Just a thought (1 cent worth): If only incrementing by 1, then just u... (by TheIdeasMan)
by Alby94
Cast
 
Why can not I convert the object of a derived class to a base class without using pointers? Derived o; Base i = (Base)o; /*/ Error /*/ Derived* o; ...
[2 replies] Last: Duplicate of http://www.cplusplus.com/forum/beginner/126132/ . Please... (by MikeyBoy)
by Alby94
Cast (Base -> Derived)
 
Why can not I convert the object of a base class to a derived class without using pointers? Base o; Derived i = (Derived)o; /*/ Error /*/ Base* o; Derived...
[2 replies] Last: Because your object o ISN'T an object of type Derived . What you'r... (by MikeyBoy)
Problem with detecting wrong user input
 
Hello guys, Im writing a function to allow the user to input the contents of a matrix. void matrix_input(double A_matrix , int dimensions, char name) ...
[3 replies] Last: i figured it out , thanks guys. Just a silly mistake. Here's the corre... (by Void life)
by enemy
pointers, arrays and elements...
 
Hello! Please, in first function I created array a. Function is returning POINTER of the array a. In main, variable z is a pointer. But , is z an array.- or ...
[3 replies] Last: [quote=Standard] 5.2.1 Subscripting [expr.sub] 1 A postfix expre... (by MiiNiPaa)
by ccdare
integral promotion question.
 
If the expression is: short a=11; short b=a; In the second expression, will a first be converted to int type then converted back to short? just curious...
[1 reply] : Both a and b are of same type, so there should be no reason to convert... (by keskiverto)
Problem with pointers and arrays
 
I get an error saying no match for operator<< in std::cout.... #include <iostream> #include <iterator> #include <vector> using std::cout; using std::...
[2 replies] Last: Oh stupid me, have school now but I'll compile it when I come back tha... (by closed account EwCjE3v7)
March 2014 Pages: 1... 4445464748... 79
  Archived months: [feb2014] [apr2014]

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