Ok Guys, Here we come to the issue of practicality. Zyrenthian is coming up with mathematical formula to figure out what is going on in one line while Leibnitz is using the looping technique I used except of course he is adding in arrays to save the values and display them seperately.
The...
Well, the simplified method of doing this would be to write the values to file. In other words walk the list to save it and then as you read in the data re-create the list. Make a class the reads/writes linked lists and that should do it.
Good Luck.
jinappa
Also, is 128 bytes right? Once you have allocated the memory for the structure, if it is still wrong, I would check the math there. that looks fishy to me.
Good Luck..
OOPs, forgot a solution counter.
int someclass::getVariations(int x)
{
int a =0, b=0, c=0;
int count =0;
for(a =0; a <=x; a++)
{
for(b = 0; b <= x; b++)
{
for(c = 0; c <=x; c++)
{
if(a + b + c == x )
{
++count;
printf("solution %d...
Well, what you have here is a basically a 3 variable integration with range from 0 to user entry for each variable where user entry is always positive. I would start out with something like this:
user enters 3
void someclass::getVariations(int x)
{
int a =0, b=0, c=0;
for(a =0; a <=x; a++)
{...
Try www.brainbench.com.. they issue certifications and they are building respect in the industry. A certification from them will show that you have an understanding of C++, it is a pay per test site though. I would recommend getting a year sub which will let you take all of their courses and...
You should be able to get these from the system commands. I think they are things like cdir ... directory list... etc. If you lookup directory in the help you should find them there. Microsoft has such a set of commands and borland usually wrote them first and Microsoft adds them, in this case...
Yes, you can do this through RTTI which stands for run time type identification. Just lookup RTTI in the docs, off hand I can't think of the command, but it is well documented.
If you can't find it let me know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.