WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

It's obvious you aren't really serious. After over a month, you still are completely vague and ignoring all our attempts to find out what you really need.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Me Tarzan, you Jane.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

movement, because water

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

United States

Middle of North Dakota? I thought you were the same place as me. Did you move?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

And the point is...?

It's cute, and the laughing is contagious...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Hmm,first sorry for some grammar mistakes...

We can help you out with that a little. To make your posts more understandable, English uses spaces after commas (,) and periods (.). For example, note the space after that comma. And also note the space after that period. This will help. The rest we can figure out.

As for graphics, as Joe said you have to find a graphics package that you can add to your compiler. This and this Google search may give you something to work with.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Thanx WaltP, I modified your code and came up with this slightly larger code.

Slightly larger? It's 4 times larger! You have a great future in management. Or politics.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

No body is taking a note that i've said i cant change the code in the files ported to me in .obj form.

Everyone is taking note of that. Everyone that has answered understands you cannot change the class code.

And u ppl r confused thinking why do i need to access the private member.

No, us ppl r nt cnfsd. We no xctly wut u r sying. (please read this, paragraph 1)

We understand exactly what you want. Four of us have told you exactly what is possible. You refuse to believe us. Everyone has said exactly the same thing to you, and that is "private members cannot be accessed if the class has not given you some way to access it."

We are not confused in the least. The only one that is confused is the one that does not understand my previous post:

OK, here's the synopsis of the problem
1) you have private values in a class and you cannot change the class
2) private values cannot be accessed in a class without the class allowing access
3) if the class does not have methods created that allow access, you cannot access the private values

Final result:
You cannot access private values. They are protected. That's why they are private -- so you can't access them and mess something up.

Please explain what you do not understand about what I just quoted.

And read my point …

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

You'll know when

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I think you should do it. How else do you get experience except by doing it? Don't let others tell you you can't or shouldn't. Prove 'em wrong.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Tss.. By now you should know that I always use indenting, but I missed it just this once.

Sorry, but I look at hundreds of posts a day. I don't memorize every individual's style and if I see something wrong, I sometimes point it out. It was just your turn ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

First of all, use code tags. It makes code much easier to read (more info in my signature.)

Yes, please

Don't use iostream.h, as it's outdated. void main should be avoided at all costs (see my signature also).

Absolutely agree

You should use a proper compiler instead of Turbo that doesn't compile such bad coding practices as I have mentioned above.

Most people here frown on Turbo simply because it's old. Most current compilers allow the same bad coding practices (esp those listed above) as Turbo, so upgrading for that reason is not necessary. The only reason to change IMAO is you want to use the power of your 32bit processor. The compilers sited are good for this. If all you are doing is learning how the language works, most compilers (including Turbo) will do the trick just fine.

Now, to analyze your code in place. Basically just reiterating what's already been said but with the code intact:

#include <iostream.h>

{   // this { starts a block, but there's nowhere for the block 
    // to live.  This needs to be in a function -- like main()
    cout << "Hey." << endl;      // These can't be here, either
    cout << "Look what I made."  // they also must be in a function

#include <iostream.h>    // why twice?
void main()
//math
    // here's where that { must go
    int x,y; //declare two integer variables, x and y
    x=20; //set x to 20
    y=10; //set y …
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

No. Once compiled the source code cannot be retrieved.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

How about a slight modification that uses the the knowledge that c-strings are always terminated with \0:

void cremoveFirstChars(char * buffer)
{
    char* actualMessage = new char[sizeof(buffer)]; 
    p = -1;                          // initialize the pointer
    do
    {
        p++;                         // next character
        actualMessage[p] = buffer[p+2];
    } while (!actualMessage[p]);     // stop after the \0 is moved
    std::cout << actualMessage;
}

And niek_e, please watch your intenting -- make your code readable. Teach by example. :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I doubt it's a hotlinking problem. My avatar as of today is sitting on my site. Another try:
[img]http://pattinson.net/mousehp.jpg[/img]
Oh, look!!!!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I thought he did it by inputting text to a website which generated the image... he did post the link a while back, but I've forgotten it by now.

It starts that way, but the words come out too small. So I import a blank Einstein into Paint Shop Pro and create a layer with just Einstein. Then
1) back to the website (http://www.hetemeel.com/index.php)
2) enter the text I want,
3) grab the text only
4) add it as a layer between the whole picture and the Einstein layer
5) resize and reposition the lettering so it looks good
6) save it
7) crop the image
8) upload it

The only reason I use that site now is I like the looks of the text. If I can find a couple good looking handwritten fonts I could use, I could do it all by myself. :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Since you've shown that you are trying....

row = 0;                  // initialize the starting row value
for (r=1; r<=10; r++)     // loop for 10 rows
{
    row += r;             // add current row to starting row value
    col = row;            // setup the column value
    for (c=0; c<10; c++)  // loop for ten columns
    {
        col += c;         // add current column to the column value 
        printf("%2d ", col);
    }
    printf("\n");
}
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

OK, here's the synopsis of the problem
1) you have private values in a class and you cannot change the class
2) private values cannot be accessed in a class without the class allowing access
3) if the class does not have methods created that allow access, you cannot access the private values

Final result:
You cannot access private values. They are protected. That's why they are private -- so you can't access them and mess something up.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Interesting.... And after all these years, too. Out of curiosity, when you go to a restaurant, when the pink & orange spike haired girl with tattoos and piercings asks for payment, do you hand your credit card to her and she disappears with it? ;)

Pink & orange spiked hair with tattoos...? What sort of restaurants do you visit? ;)

All kinds. Around the U you get more of these with the strange dress code...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

yeah, hey by the way does lager exist in the us in the same way that it does in europe?

i was speaking to some canadians and they didnt know what the diff between beer and lager is

:mrgreen: You're not old enough to drink! What do you care? :mrgreen:

Actually, most of us wouldn't know, never having the opportunity to do a taste test...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Maybe I should have been more explicit, but even this is good, made me laugh...:cheesy:

Then my message was successful!!!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

If you don't know what a HWND is, then here is a good tutorial intruduction into MS-Windows programming.

so could you quickly tell me what is HWND?

Is there someting about Ancient Dragon's statement you didn't understand?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

to undeserving folks

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

The English language is suffering at the hands of the text message revolution I am very much afraid to say. It is a particular bugbear of mine, especially as the written word interests me so much on a personal and professional level.

clm dn mn itz gna b ok
i rly ht thz crp 2...

In my previous post I stated that I spoke English like a native followed with the word "how"... It's so sad when you need to explain something that was intended to be humorous.

I got it!

wow i just noticed that i average 4 "lol"s min in each post

Another peeve I have. I hate reading a message broken up with lol. It's getting to be totally meaningless and awkward to read. For one, lol looks like it should be part of the sentence, whereas LOL you know is not a word. Or better yet :lol: but in moderation.

Another similar thing is when people say "I'm so stupid lol" or some other self-denigrating statement. Laughing when you do something dumb is OK, but making a statement about being dumb and laughing about it IMHO is :sad:.

Also :rolleyes: I hate :evil: when people put :)'s after every :-| few words :confused: :mad:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

And btw, what goes around always comes around.....

... especially hubcaps. And they make a kool noise, toooo. rouwr, rouwr, rouwr, rouwr, rouwr...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Doesn't VC++ have an option to create a deployment or application wizard? With this you create a setup file and the DLLs needed are loaded into the target system.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

how do you fill an object such as a rectangle with a colour using setfillstyle(); ?? I dont want to use flood fill as i am having more problems with that..

You don't. setfillstyle() simply sets the type of fill. You still need a function that actually performs the filling, like floodfill() or fillpoly() .

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

tsss.. didn't you read the forum rules :)

Niek

That's not leet. I've been using 'cuz long before the internet was even Arpanet... :p

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Think before you open your mouth

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

considering alone we

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Tonight I'm reading this and wondering why so many posts sound like Yoda.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Without others, we

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I agree with Ancient Dragon. Where would we be without Earth? No, seriously, where would we be? Would we be on Mars? Would we be Martians instead of Earthlings?

Where would we be? It's obvious! Floating around in space -- a horde of hovering homo-sapians happily hanging harmoniously in the hollowness of the heavens having no hardened habitat.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I agree with Joe. You have a buffer. There is a string in it. You can't remove a character from the buffer -- it's part of the buffer. All you can do is overwrite a character. And in this case, overwriting the terminator may simply change "This is a test" to "This is a test ⌂@╝@ Ç☺"

Why would you want to do such a silly thing?

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

While coding the decrypter, I came across some issues as well. So here's what I need help with so far:

I need to get the following numbers into a loop to read off of an array that has the encrypted 100 char message.

1      2     4     7    11    16    22    29    37    46
3      5     8    12    17    23    30    38    47    56
6      9    13    18    24    31    39    48    57    65
10    14    19    25    32    40    49    58    66    73
15    20    26    33    41    50    59    67    74    80
21    27    34    42    51    60    68    75    81    86
28    35    43    52    61    69    76    82    87    91
36    44    53    62    70    77    83    88    92    95
45    54    63    71    78    84    89    93    96    98
55    64    72    79    85    90    94    97    99   100

As suggested previously, look at the numbers and look for a pattern.

As well as getting the bottom two loops into 1 loop.

for (z=0;z<10;z++)
    {
        x=0;
        y=z;
        do
        {
            cout << e[x][y];
            x++;
            y--;
        }
        while (x<=z);
    }
    for (z=1;z<10;z++)
    {
        x=z;
        y=9;
        do
        {
            cout << e[x][y];
            x++;
            y--;
        }
        while (x<=9);
    }

Any hints or help appreciated greatly :mrgreen:

An algorithm does not have to be a single loop. IMO you have the answer here. There is no need to complicate the thing by trying to cram both loops together into one.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

you probably have a Turbo C++ , not Turbo C compiler.:eek:

Interesting. I didn't realize they actually had a C-only compiler. I thought I bought mine as soon as it came out. I guess not... :o

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Just remember to always use the Flag Bad Post link from now on ... us mods have our own way of handling things when that feature is used, and it is definitely the most speediest method.

"the most speediest method"? Now I know why you're into computers. I'm also ESL thanks to these toys! :confused:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

broken, it just

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Did I mention Uranus?

Why are Klingons and.... sorry :twisted:

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

As for what I cannot type, it depends on how tired I am and how fast I am typing. If the answer to both is very, then because always comes out as becuase for some reason.

Now there is one word I always get wrong

Not me 'cuz I know how to avoid that misteak! :)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Great news! So we'll have a Naruite on the board soon, I'll wager. The next generation of DaniWeb members!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

WaltP:

I am using the IMG code (not URL) and the PhotoBucket service for hosting, then I paste it in Daniweb editor. It has worked great each time.

Regards,
Matty D.

I'm using IMG code and pointing it at my picture too (you can see qhat I did when you quoted me)....

I guess you need to tell me what you did differently than me rather than just what you did. IFAIK I did exactly the same thing.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

i work in tubo c compiler.
if u want 2 enode using that, i can help.

He's asking about a loop which is not a compiler dependent command. Even Digital Mars could handle this...

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

I'd appreciate it if you didn't call me Mr. Jobe, makes me feel old and superior somehow, either JoBe or Johan(my real name) will do ;)

Good luck getting Mr. ~s.o.s~ to do that :mrgreen: He is a very respectful person -- to a fault...

I certainly think it's worth it, but, due to lack of trust in online buying with a credit card, I tend to use a store called proxis.be and they don't sell it anymore.

Interesting.... And after all these years, too. Out of curiosity, when you go to a restaurant, when the pink & orange spike haired girl with tattoos and piercings asks for payment, do you hand your credit card to her and she disappears with it? ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Try outputting a character when you are in hidemouse() to be sure you are in fact executing it.

apurv, when you post something you should at least explain what it does... For all we know, that code could erase your disk. ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Ah...forgot to put the exit(1) statement if any of the files failed to open. Man am I going senile......:sad:

Minor point -- why call a special function like exit(1) when return(1) does the same thing? ;)

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

While you are waiting for a key, call you cursor blink function. When a key is pressed, stop calling it. Process the key and go back to your wait loop.

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Give me Barsoom.

I've always liked Barsoom, too. Many authors made many great stories about it!

WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

Go to the site www.imageshack.us, upload your picture there. After uploading you will get an URL of the image.

Just click the insert image button on the WYSIWYG editor of Daniweb, paste the URL. Your pic will be displayed within the post...

Tried that... Didn't work...

One more try:
[IMG]http://wpattinson.com/puppy.jpg[/IMG]
Nope--- no such luck!

OK, just click this then -- darn it!
http://wpattinson.com/puppy.jpg