J'm just beginner to C++ and I'd like to translate this vb loop to C++ ; if anyone can help me with this:
For Pmi = 1 To L: lett(Pmi) = Mid(word, Pmi, 1): Next Pmi
Printable View
J'm just beginner to C++ and I'd like to translate this vb loop to C++ ; if anyone can help me with this:
For Pmi = 1 To L: lett(Pmi) = Mid(word, Pmi, 1): Next Pmi
PHP Code:char word[100];
int pmi;
char dest[100]
// strcpy(word,"some stuf or another");
for(pmi=0;pmi<strlen(word);pmi++)
{
dest[pmi] = word[pmi];
}
// this algorithm makes very little sense in c, or VB either.
Thanks for your support, but of course it was abstracted from context, so here is the rest of the code (see attachment below). This is quite efficient permutation procedure (even in VB - works quite fast), so I'm trying to rewrite it to C++. I've recoded a little of this stuf, but the errors I've received are too difficult for me to ovecome at this stage of my C++ knowledge (As I said J'm new to C). So I'd be very grateful for help with translating this procedure (even partly- suggestions and comments).
i think the line you posted here should copy a string into an array of characters. this makes no sense in c because strings in c are already array of characters.
so, in your code, what does
Select Case OChoice
mean? There is no variable named OChoice (i'm rather a c programmer than vb), the vb-reference has no such entry and the description of the select case block doesn't describe it either.
Could you help me out, so I could help you?
All the buzzt
CornedBee
more questions:
what is result in this case?
what is BFInitialise?
what does processcode do?
Here is the rest of code (see attachment).