I think it should be numbers[k++], with the k between brackets. This code assign to the first k values the ones of the next k. However, the first three ones will be replaced after performing the...
Type: Posts; User: Veneficvs
I think it should be numbers[k++], with the k between brackets. This code assign to the first k values the ones of the next k. However, the first three ones will be replaced after performing the...
I have managed to ask informations. Yes, I am allowed to use temporary variables! Pfew. Now could you please tell me what is wrong in my problem so the thread can be closed?
I suppose. But I have been thinking for more than two hours already and I have also asked an advice from an Informatics teacher and I have been told that it is impossible without having at least one...
I did it somehow. But the problem now is that the last k numbers are replaced with the first k variables whose original values have been replaced...
#include <iostream>
using namespace std;...
I have been tasked with a program that shifts an array k position without additional memory. I don't know what kind of memory are they talking about, because I will obviously have to use one index...
I understand the situation. Thank you very much!
I understand that was very, very bad... So isn't it another way? I could not find any other solution and I would do my best to avoid recursion, as that is never recommended, because of the time it...
Ok, sorry... so I have the number 1784. And I have to obtain the digits of the number in a vector. So the vector will contain :
1 7 8 4
Now I have to compute the sum of the digits... but that's...
I am being asked to calculate the sum of digits , which will be obtained into an array. The problem is that I need to save both time and space.
My plan was to add each digit to the sum and verify...
I did it. I actually used DirectX 9 SDK this time... If I compile it with VS 2010 I get the same ........... With Visual C++ 6.0 (which easily adds the DirectX includes to the directories), it does...
Damn it. So you are suggesting me I should try to install SDK 2009 maybe, or something? Thanks for your responses. If someone knows another one as well, please post here. I will still like this...
Nothing at all. Very freaky indeed. My computers acts so strange, even computer geeks freak out... like when all of a sudden Minesweeper won't laungh or when Oblivion needs only 200 RAM, while other...
Normally I wouldn't do this, since making another one's code from scratch does not seem at all appropiate and same for sending reference without this being the last resort, but still... You can try...
Ok, the question does not concern too much of DirectX experience. But I will post it in the Windows section, because I am creating a Windows Application here after all.
I am including d3d9.h,...
Still doesn't work. If I say
ALpha: 2 2 2 2 2
Beta: 3 3 3 3 3
Teta: 4 4 4 4 4
And then Alpha + Beta + TEta it gives me:
1 1 1 1 1.
Edit: corrected with temp += treia... but for more than 3...
I didn't do it because I tested with pluses. And it did not work for them..
Edit... I found the problem... it seems that contor runs out of dimension.
Thanks a lot! Does it work for any number of arrays?
Edit: Doing what you said gives me a debug error.. could you modify it on my code, please?
Here is the code
CArray temp, first, second;
for(contor = 0; contor < (int)simbols.size(); contor++)
{
if(simbols[contor] == '+')
{
for(i = 0; i <...
I will translate the code and post it here... I am too tired and freaking nervous now.... good night.
I did that.... I even overloaded += so that I can have a temp class which does
temp += this + that . then it keeps adding.. but id does not add correctly..
No, it's a class with a vector in which I store the sumation or the difference of the components.
This will be the last question concerning my program.. So the user inputs a string like:
this + that + anotherOne - justoneMore
where this, that etc are classes containing a name and a vector...
I got it now. Thanks again.
The factorial function goes like this:
int f(int x)
{
if(x == 1)
return 1;
else
return x * f(x - 1);
}
Thank you very much... I totally forgot about the stringstream stuff. And you were right. I modified the loop by writing "found + 1". It gave me a Segmentation Error , then asked me to press ENTER to...