Forum: C++ 17 Hours Ago |
| Replies: 6 Views: 125 Re: C++ program help You should remove default values for default arguments from your functions definitions.
For example this code #include <iostream>
int myfunction(int one, int two = 2);
int myfunction(int one, int... |
Forum: C++ 18 Hours Ago |
| Replies: 2 Views: 90 Re: TCP client The amount of people that'll help you is somehow proportional to the effort you'll show, not to the number of threads (http://www.daniweb.com/forums/thread160149.html) you'll open.
I'm less than a... |
Forum: C++ 18 Hours Ago |
| Replies: 6 Views: 125 Re: C++ program help Check your variable typing (i.e. Max_Lines instead of Max_Line in line 66 but I also read countAlpha instead of alphacount elsewhere).
Also, you should pass lines as argument to the function... |
Forum: C++ 19 Hours Ago |
| Replies: 11 Views: 104 Re: helpppp I am here to learn. Sure I'd like to earn money with my work someday - but with a honest WORK. This is not a work, is helping some cheater who thinks he's better than the others, and I don't like to... |
Forum: C++ 19 Hours Ago |
| Replies: 11 Views: 104 Re: helpppp Well you misunderstood me completely, I think.
I'll assume it's my fault, so I'll try to be clearer:
There's not a single person here that will do your homework for you. And I'd add "thank God for... |
Forum: C++ 19 Hours Ago |
| Replies: 11 Views: 104 Re: helpppp LOL, what code?!?
well, if you're not lazy beyond hope of recovery... :P
Some people (me included) could feel offended by posts like yours - being offered money for what? homework?
Try to follow... |
Forum: C++ 21 Hours Ago |
| Replies: 5 Views: 123 Re: C++ problem Seriously, how much do you think we care? Moreover, I hardly think so. I'm pretty sure that you won't hold gratitude or appreciation soon after you'll hand that assignment. Not that I'd pay a penny... |
Forum: C++ 1 Day Ago |
| Replies: 3 Views: 91 |
Forum: C++ 2 Days Ago |
| Replies: 7 Views: 127 |
Forum: C++ 2 Days Ago |
| Replies: 7 Views: 127 |
Forum: C++ 2 Days Ago |
| Replies: 3 Views: 64 Re: help my out put isnt working I think that in line 89 you should put [i] after your usagekwh array in the cout statement.
Just had a first glance at your code though. |
Forum: C++ 3 Days Ago |
| Replies: 7 Views: 127 |
Forum: C++ 3 Days Ago |
| Replies: 7 Views: 127 Find all subsets of a given set - Optimization? Hi all there.
I was given the task to implement a Subset class with a few function.
It should be structured so to contain the original set and make it possible to generate all subsets.
Right now I'm... |
Forum: C++ 6 Days Ago |
| Replies: 19 Views: 317 Re: sorting array with respect to name and CGPA Ok, I'll try to be nice:
1 - Don't (repeat: don't) PM for help. I'm not your friend nor your tutor.
2 - Moreover, don't (repeat: don't) ever ask things like "please write for me the full program.... |
Forum: C++ 6 Days Ago |
| Replies: 7 Views: 149 Re: cout types a is not a char, is an array of char. you have to print its component one at a time. |
Forum: C++ 6 Days Ago |
| Replies: 4 Views: 97 Re: Simple C++ Class problem I don't understand what you are trying to do - but my suggestion was to write a constructor for your B class like this B::B() {
ob = new A(5);
} so that every time an object of type B is... |
Forum: C++ 6 Days Ago |
| Replies: 4 Views: 97 Re: Simple C++ Class problem You should write your B class like this:
class B {
A *ob;
};and then in B constructor add ob = new A(5);
I think you can't call constructors from within a class declaration. |
Forum: C++ 6 Days Ago |
| Replies: 7 Views: 144 Re: Class declaration syntax error Post all the code you tried to compile, please. I can't see any error in this part.
Also, #include <string>, not string.h. And since you include it, why not use std::string name;? |
Forum: C++ 7 Days Ago |
| Replies: 32 Views: 335 Re: Help with Hangman diff if you saved your file as DRAW.h then #include "DRAW.h" will work, unless you placed the file in a random folder of yours. In that case, you'll need to enther the full path (e.g. #include... |
Forum: C++ 7 Days Ago |
| Replies: 32 Views: 335 Re: Help with Hangman diff Sorry, I read only the last 3 posts - but shouldn't it be d.rope(); as well as d.head(); ?
And you don't want draw::draw(), as VernonDozier already said. Just draw d; |
Forum: C++ 7 Days Ago |
| Replies: 4 Views: 87 Re: code I think the question is: "are you able to read this?!?".
I'm sorry, I'm not :( ... |
Forum: C++ 8 Days Ago |
| Replies: 7 Views: 144 |
Forum: C++ 8 Days Ago |
| Replies: 19 Views: 317 Re: sorting array with respect to name and CGPA If I understood correctly your question you are asking how to use getline with some member variable of a struct.
Look at this and you should figure out with ease how to finish:
std::string... |
Forum: C++ 9 Days Ago |
| Replies: 19 Views: 317 |
Forum: C++ 9 Days Ago |
| Replies: 12 Views: 205 Re: Square Root of -1 If you are making a complex class you should return a complex object, and it should not be the first operand. I mean given z and w two complex number, the instruction z + w should not modify z!... |
Forum: C++ 11 Days Ago |
| Replies: 4 Views: 86 Re: Array Algorithm If both array1 and array2 contain 25 elements then you should write your for loops for (count = 0; count < 25; count++) as arrays of n elements are indexed from 0 to n-1.
Moreover, the second cout... |
Forum: C++ 11 Days Ago |
| Replies: 8 Views: 206 Re: C++ homework...Please help!! No, I fear it's not like this.
First, why do you open "ProjectInfo.txt" ? If you open it to actually load the info in the numDays array then you should do it in another function and pass to this... |
Forum: C++ 11 Days Ago |
| Replies: 8 Views: 206 Re: C++ homework...Please help!! Post an attempt and we will help you fix the errors, if you encounter any.
Try to take one step at a time towars the ultimate goal of a complete and working program.
You managed to get input from... |
Forum: C++ 12 Days Ago |
| Replies: 7 Views: 99 Re: Inheritance Trouble Protected means private but inherited like private (hence accessible) by derived classes. If you declare them protected they'll behave just like if they're private. There's a table in the link I... |
Forum: C++ 12 Days Ago |
| Replies: 9 Views: 115 Re: Recursive program issue That's not where the problem lies. {
if input == 1
return recursiveGCD;
if input == 2
return iterativeGCD;
}
is wrong both from the syntax point of view and logically. You miss some... |
Forum: C++ 12 Days Ago |
| Replies: 7 Views: 99 Re: Inheritance Trouble Take a look at this (http://www.cplusplus.com/doc/tutorial/inheritance.html), it should explain the general concept :) |
Forum: C++ 12 Days Ago |
| Replies: 7 Views: 99 Re: Inheritance Trouble Your D class does not inherit from class A. You should write class D : A
{
// your code here
}; to inherit from class A. |
Forum: C++ 12 Days Ago |
| Replies: 18 Views: 315 Re: Need homework help If you set something to 0 you can double it for a lifetime - it will never become something different than 0.
Think on using a loop to add the dailySalary to the total earntMoney for each day of... |
Forum: C++ 12 Days Ago |
| Replies: 4 Views: 116 |
Forum: C++ 12 Days Ago |
| Replies: 2 Views: 108 Re: char arrays and strcpy trouble strange, #include <iostream>
using std::cout;
using std::endl;
int main(void) {
char * word = new char [20];
char temporal[ ] = "hola";
strcpy(word, temporal);
cout << word << endl; |
Forum: C++ 12 Days Ago |
| Replies: 4 Views: 116 |
Forum: C++ 12 Days Ago |
| Replies: 10 Views: 163 Re: ARRAYS I suggest you to read this (http://www.cplusplus.com/doc/tutorial/arrays.html) before you ask more questions. Read it carefully and you should be set an gone, and in case of doubt come back here for... |
Forum: C++ 12 Days Ago |
| Replies: 8 Views: 206 Re: C++ homework...Please help!! Apart from useless variables (numDays array and m) I think your main problem is that the events array just contains garbage data: it is not initialised anywhere. If you intended to use another events... |
Forum: C++ 12 Days Ago |
| Replies: 10 Views: 163 Re: ARRAYS well you could use loops, something like
for(int i = 0; i < 20; i++) {
for(int j = 0; j < 60; j++) {
myarray[i][j] = "code for random number";
}
} |
Forum: C++ 12 Days Ago |
| Replies: 10 Views: 163 Re: ARRAYS a one-dimension array is defined by type name[dimension]; or explicitly type name[] = { element1, element2, ... , elementn } where n = dimension. It has exactly n elements, indexed from 0 to n-1.... |