Beginners - May 2012 (Page 28)

how to improve - HCF (1,2)
 
#include<iostream> using namespace std; void hcf(int a,int b) { const int num1 = a; const int num2 = b; int c; int hcf; bool check_hcf = f...
[22 replies] Last: Also, note that some compilers supply intrinsics for small, common ope... (by andywestken)
by redak
Problem with *= operator
 
Hi, I'm getting in to C++ using the book by Stephen Prata: C++ Primer Plus. As part of explaining functions, listing 7.4 illustrates an odds calculator, which ...
[19 replies] Last: O'k. I do not think that Lopes means wolf. And moreover Lopa da Vega... (by vlad from moscow)
'For Loop' output problem help
 
Question: Write a function named SumTo() that takes an integer parameter named nValue, and returns the sum of all the numbers from 1 to nValue. I am not gett...
[4 replies] Last: Oh yeah. Absolutely Right. Got your point. Thanks :) (by vdarth53)
Suggestions on improving my working program
 
I have a program done which works, but for some reason it seems like it could be more concise. I would love any suggestions as to how to make this better. Also...
[6 replies] Last: Is 1 not a positive integer? (by moorecm)
Initializing 2d Vectors in the constructor
 
I have a class with two 2D vectors declared private like this private: char ans; int row,columns; string command; vector<vector<double> >MAT; vector...
[2 replies] Last: ohh god you're right, how could I have been so blind, it was telling m... (by doddolfur)
Multiple inheritance and ambiguous members
 
If I have a series of inherited classes like this: class human { protected: int a; }; class father : protected human { /* ... */ }; class mother : pr...
[2 replies] Last: I learned something! Thanks. For others, this is called the "dreade... (by Stewbond)
by userid
MemSet??? Please Assist???
 
Hello - If the count argument was to many bytes for an array element, say element 0, would the remaining bytes flow to array element 1, and so on? Thank you in...
[2 replies] Last: @webJose, Legacy code port... Your response is clear and informative,... (by userid)
by userid
MemCpy??? Please assist???
 
Hello - I have written a routine in C# that is supposed to replace the MemCpy C++ routine - but the numbers I get are nothing like that displayed in the array ...
[5 replies] Last: @Coder777 Thank you. (Not mixing. :-)) @JL Borges Above-and-beyon... (by userid)
turning a string in to a character
 
So I'm kinda new at this and I'm using a function I found which I don't entirely understand. int getdir (string dir, vector<string> &files) { DIR *dp; ...
[1 reply] : It's not asking for a character, it's asking for a pointer to characte... (by Disch)
Help with Function Program
 
I need to write a program that acts as a menu and a cash register. i have figured out the menu part and for most part the cash register. All i need to do no...
[no replies]
Problem solving help
 
Hello once again, I'm doing one of the final problems of my final exam of C++. I just don't understand very well how am I supposed to approach this problem. A p...
[2 replies] Last: Now that you have the total square footage of walls to be painted, you... (by Zhuge)
Anyone willing to assist me getting started with this code?
 
I am attempting to create a program that can be used to show possible solutions to a puzzle. My description may need some further explanation, but I'm going to ...
[no replies]
pass an argument to nested function
 
void func_3() { cout << x; }; void func_2() { func_3(); }; void func_1() { func_2(); }; int main() { string x; func_1(); return 0; } A...
[1 reply] : You can not do that because func_1 does not accept any parameter. (by vlad from moscow)
Difference between class & structure
 
Difference between class & structure ???? Class - default access specifier as "private" Structure - default access specifier as "public" Apart from a...
[1 reply] : http://msdn.microsoft.com/en-us/library/aa664471(v=vs.71).aspx I'm no... (by Stewbond)
multiplying 1D Array with a 5D Array
 
Hi, i am currently doing a final assignment for my programming module at college and i am struggling to get the correct output for one part of the program and t...
[no replies]
help with creating program where you input an equation (x^2 + 3x +5) etc (1,2)
 
so, i'm creating my own program for a project and its urgent! D: this is what it looks like so far : //graphing calculator. plot points derive antiderive and...
[30 replies] Last: Glad I could help! (by shacktar)
I am a beginner that is thought of as a noob by beginners.
 
I am totally lost because I don't know what to use to program. I understand the language pretty well.
[3 replies] Last: I see many people using Code::Blocks so you could try that if you want... (by Peter87)
enum not compatible with int?
 
As a little project for myself to prove myself in the C++ world, I've decided to get a little text-based game going. I had the following: enum monsterType {Zo...
[6 replies] Last: From the C++ Standard Since enumerations are distinct types, objects ... (by vlad from moscow)
variable structure name, is that possible?
 
Hey is it possible to buit a structure with a variable name? e.g .I've a n data files which I want to load and work with. Now I tought I could built a st...
[3 replies] Last: In this case maybe it is better to include a data member for a filenam... (by vlad from moscow)
by j123t
TIC - TAC - TOE??
 
For
[4 replies] Last: I don't think Texan40 really understood what you ment... But is a poin... (by Jikax)
May 2012 Pages: 1... 2627282930... 59
  Archived months: [apr2012] [jun2012]

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