Beginners - July 2010 (Page 6)

Function overloading by swapping order of parameters?
 
The book I'm using to learn C++ is talking about function overloading. It states that 2 functions with the same name must have either a different amount of p...
[1 reply] : Yes gers1978, as long as there is some difference in the function para... (by Moooce)
functions and arrays.check question below:
 
implement a program that : 1. reads elements into an array of size n. 2. returns the minimum element and sum of all elements in array. 3. prints out the sort...
[2 replies] Last: that was just my trial for the question above but it is generating a l... (by kiprotich)
vector initialization with array
 
can anyone please look at this code and tell me what's wrong? #include <iostream> #include <vector> int a = { 1,2,3,4,5,6,7,8,9,10 }; //array of 10 v...
[4 replies] Last: Hi! I have a problem. If I write #include <iostream> #include <ioma... (by rossoneri)
compiles but doesn't execute (c++ runtime error)
 
Hi my code is for a program that divides two inputed numbers with an error handler. I am trying to create this using modules because I am learning about that. ...
[8 replies] Last: It's a capital o not a zero. O vs 0, hard to tell. It is an optimiz... (by RyanCaywood)
Calculating Minimum Values
 
Hello. I am writing a program which collects data from the user and once all the data is entered, calculates the mean, and the highest and lowest numbers enter...
[16 replies] Last: Thanks for all your help! It's working just right now. Sarah (by slg5094)
Confusing syntax
 
Can anyone help me? And I did not understand the code below. It's very simple, but I do not know this syntax. The parts in bold were the ones that I had more...
[4 replies] Last: Ah! Now I get it right! This was a question of a test that I did. Tha... (by brazyuri86)
by Drj312
data input problem
 
the variable zipCode is not being read in on line 73 or 85. i am guessing i am using the wrong way to input it. advice please #include <iostream> #includ...
[1 reply] : I think the problem is the reading in of the address. Its more than on... (by Galik)
Prior to declration error.
 
I'm pretty sure it has something to do with my global and local settings, but for the life of me, I can't seem to figure out what I'm doing wrong. I'll post my ...
[2 replies] Last: Found the problem. With all my elses in the .h file with the missing e... (by Deathscreton)
by b52
Dereferencing array of pointers to functions
 
Could someone please clarify the last statement in this code? I don't understand the reason for subtracting 'a' from c except that the code will compile but ...
[2 replies] Last: Does anyone have a spare Southwest Airlines ticket? Thanks Athar. ... (by b52)
I don't get how to use "the do-while loop".
 
I'm just learning about the do-while loop, and about the if and else thing. By reading the tutorial on this website, I thought the "do" is supposed to repeat th...
[2 replies] Last: The loop continues as long as the while condition is fulfilled (note... (by Athar)
by Silva
Cross-Platform Client/Server with a twist
 
Hi, I am new to the boards and have just started programming in C++, I have a project in mind and could do with some pointers or reference to get me on the ...
[7 replies] Last: You can just have the client read the server address from a configurat... (by Athar)
by redhat
getline
 
Hi . everyone. i have problem with getline() int main() { int count = 1; string word; while(count <=2 ) { cout << count; ...
[2 replies] Last: std::getline() replaces the string every time it is called. (by Galik)
vector class
 
Hi, When you declare a vector I normally do this: #include <vector> using namespace std; int main(void) { vector<int> myvector; myvector.pu...
[1 reply] : std::vector has std::allocator as default allocator, so there's no dif... (by Bazzy)
by Erain
Arrays, pointers and functions problem
 
Hi all, I'm struggling to get a function working, and hoping someone could help. The idea is to have a function which I can call to load all my image files. ...
[2 replies] Last: Oh, I've got it working. Am I right in thinking that when a function r... (by Erain)
by Mreza
iostream and namespace
 
Hi! what is the difference between using <iostream.h> and <iostream> using namespace std; Can you tell me where should i use the first one when the s...
[2 replies] Last: Download VisualStudio 2010 Express. It's pretty good. Though I pref... (by RyanCaywood)
Input an integer array from a file
 
I can't figure out how to write out the following function correctly:: The data stored is in the form on rows and columns. void matrix::read_file(char* f...
[17 replies] Last: You are a genius; I was making things complicated; This works very we... (by manasij7479)
MIN function
 
i don't know c has builtin minimum function or not. but i want to write a function which will find minimum number in a integer array. please hint me i want to ...
[7 replies] Last: int minimum(int array , int size) { int min = array ; for (... (by RyanCaywood)
by drw4d
root in a binary search tree
 
Hopefully, this might be an easy question. I am working on a problem for a class I am taking. We just have to modify the driver some, so I have taken the ex...
[4 replies] Last: It should not be declared in the derived class if it is already in t... (by jsmith)
Alphabetizing a string array
 
I've been trying to create a program that alphabetizes a given array of strings. The program builds just fine, but when I try to debug it, it crashes on me and ...
[4 replies] Last: Thanks! That solved my problem. (by Pelephant)
by oahsen
initializing newmat library
 
Hello everyone, I am pretty beginner in C++ and trying to use a library called "newmat10". However, when I writing just the following code to create a new ma...
[3 replies] Last: The header "newmat.h" only has the names of the functions, not what th... (by Zhuge)
July 2010 Pages: 1... 45678... 31
  Archived months: [jun2010] [aug2010]

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