~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe you can do a workaround like this

#include <iostream>
using namespace std;

class Mine
{
    char pattern [6][30] ;

    public:

    Mine ()
    {
      char buffer [6] [30] = {"      #####        ",
                                        "     #     #          ",
                                        "    #       #         ",
                                        "   #       # #       ",
                                        "   #       # ##     ",
                                        "   #               #   "
                                        };

        for (int i = 0; i < 6; ++i)
        {
            strncpy ( pattern [i], buffer [i], 30);
        }

    }

    void display ( )
    {
       for (int i = 0; i < 6; ++i)
       {
           fputs (pattern [i], stdout);
           putchar ('\n');
       }
    }

};

int main (void)
{
    Mine me;
    me.display ();
    return 0;
}

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe something like

#include <iostream>
#include <string>

using namespace std;
const int tokenLength = 4;
int main (void)
{
    string str = "12345678";
    int strLength = str.length();
    if (0 != (strLength % 4) )
        exit (1);
    char* temp = new char [5] ;
    memset (temp, 5, '\0');

    int sum = 0, i = 0;

    int loop =  (strLength  / tokenLength );
    char buffer [tokenLength];
    while ( loop )
    {
         strncpy (buffer, str.c_str()  + i * tokenLength , 4);
         sum += atoi (buffer);
         --loop;
         ++i;
   }

   printf("Final sum %d\n", sum);
   return 0;
}

Though it is not very generic and picture perfect code, it just gives the general idea. YOu might want to optimize and clean it up a bit depending on your specific usage.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe something like

#include <iostream>
using namespace std;
class hello
{
private:
    char array[4][5];
public:
    hello();
    void get_hello()
    {
        cout << "From the function: array[2][2] = " << "'" << array[2][2]  << "'" << endl;
    }
} hi;

hello::hello()
{
    for (int i = 0; i < 4; ++i)
    {
        strcpy ( (array[i] ), "####");
    }
        cout << "From the constructor: array[2][2] = " << array[2][2] << endl;
        (*this).get_hello();
}

int main()
{
    hi.get_hello();
    cout << "\n" << "Press Enter to end this programm";
    cin.get();
    cout << endl;
    return 0;
}

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

POsting your code properly means :

1) List the basic logic and the purpose of your program ie what it is supposed to achieve.

2) List the unexpected behaviour that your program is displaying and if you are getting errors list the log file of errors.

3) Properly indent the code to make it desirable to read.

4) Enclose the code in

and

tags while posting your code.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Rewrite your program in this way :

#include <iostream>
using namespace std;

int main (int argc, char *argv[])
{ 
   char quit = '\0';
   while (quit != 'q')
   {
       cout << "Hello ! This is a console app." << endl;
       cout << "To create a console, go to Project Options and select"     << endl;
       cout << "\'Win32 Console\'." << endl;
       cout << "Press q to quit " << endl;
       cin >> quit;
        }
    getchar ();
    return 0;
}

Copy and paste this code and tell the errors which result.
Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

FILE *ptr;
char i;
ptr=fopen("file.c","r");
while((i=fgetc(ptr))!=Null)
printf("%c",i);


leads to infinite loop???

but
while(fgets(str,80,ptr)!=NULL)
puts(str);

on the similiar terms doesn't???

Maybe because fgetc () returns EOF when end of file is reached or an error is encountered hence your loop never terminates while fgets ( ) returns NULL whenever it encounters End of file or an error.

So maybe something like while ((i = fgetc (ptr) != EOF) should do the job.

PS. It is generally not advisable to base your file reading loop on EOF since it has the prob of reading an extra record and then jumping out of the loop.

HOpe it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes it's so unfair, the baddies have taken over 'Mr' and given it a bad name !

Try 'exalted one', i'm sure no one will complain about that :)

Except maybe Mrs Wolfpack she's so hard to please he he :cheesy:

Hollystyles sure bags away the award of being cryptic again and again.
*hint: wats up with the Mrs. Wolfpack thingy???*

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
#include<alloc.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<dos.h>
#include<ctype.h>

typedef struct node
    {
    int dd,mm,yy;
    int cus_ac_no[15];
    char cus_name[25],cus_add[45],cus_ph_no[17];
    double cus_bal;
    float cus_intrst;
    struct node *next;
    }node;
    node *L,*ptr;


void add()
 {
   node *p,*q,*new; 
// new is a keyword which cant be used as a 
 //varible . better choose a new name
  p=q=L;
  clrscr();
  new[/COLOR]=(node*)malloc(sizeof(node));
  if(new==NULL)
  {
   printf("list is full");
   getch();
   return;
   }
   else {
   printf(" Enter customer account number  : ");
   scanf("%d",new->cus_ac_no);
   printf(" Enter customer name    : ");
   gets(new->cus_name);[/COLOR]
   printf(" Enter customer address  : ");
   gets(new->cus_add);
   printf(" Enter customer phone number  :");
   gets(new->cus_ph_no);
   printf(" Enter the amount you want deposit :");
   scanf("%lf",&new->cus_bal);
  while(new->cus_ac_no > p->cus_ac_no && p!=NULL)
  {
  q=p;
  p=p->next;
  }
 if(L!=NULL){
 q->next=new;
 new->next=p;
 }
 else{
 L=new;
 new->next=p;
 }
}
 }




 void list()
    {
    node *ptr;
    ptr=L;
    while(ptr!=NULL);
    {
    gotoxy(8,2);  printf("============================================\n");
    gotoxy(8,3);  printf("......Customer's Information .......");
    gotoxy(8,4);  printf("============================================\n");
    gotoxy(7,7);  printf("|-> Customer Account number is: %d",ptr->cus_ac_no);
    gotoxy(7,10); printf("|-> Customer Name is: %s",ptr->cus_name);
    gotoxy(7,13); printf("|-> Customer Address is:  %s",ptr->cus_add);
    gotoxy(7,16); printf("|->Customer Phone number is:  %s",ptr->cus_ph_no);
    gotoxy(7,19); printf("|-> Customer Balence is :  %.3lf ",ptr->cus_bal);
    gotoxy(7,22); printf("|->Account opened on  :");
    gotoxy(7,24); printf("<-->Press any key to continue");
    ptr=ptr->next;
    } getch();
     }
    void transac()
    {
    printf("trans..");
    getch();
    }

   void del(int cus_ac_no)
    {
     node *p,*q;
         p=q=L;

// here cus_ac_no member of struct which is actually a array of
// integer is compared with a integer value which is cus_acc_no which // accounts to the comparision of an int with pointer type ?

    while(cus_ac_no!=p->cus_ac_no && p!=NULL)
    {
         q=p;
         p=p->next;
         }
     if(p==NULL){
           printf("record not found");
           getch();
       return;
           }
      else{
          if(L==p) …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yeah sounds like all the baddies in the Bond films..

This time you will die Miiister Bond..he he... hah ha.... HA HA MUWAhh Ha hahahahahah.....

Here i try to spread the feeling of respect and goodwill and get tagged as a BADDIE just bcoz i say MIIIISTER.
This world is really cruel ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Don't call me Mr. or any other title.

You dont like the respect i have towards moderators and admins ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

See Miss Dani i told you there was a pattern. I just didnt wanted to be a spoil sport but Mr. Wolfpack here just proves my point.

HAHA got you.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hehehe :) See ... I told you that not revealing all the details of the user titles encourages participation!

Argh, damn it. Well atleast know some of the titles.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I don't make up the titles? There's a pattern? Oh tell me what it is! Tell me, tell me! :) hehe ;) ;) ;)

Thats for the The queen of dani web and the lesser beings to figure out, coz i happy with my deductions and dont want anyone commenting on it :evil::cheesy::idea:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

why dont you use the other 95% for a change and think before posting mate, think hollystyles had the right idea :) -

"I think you'll find after about 1000-1500 Dani makes them up"

darren

Coz if i used the other 95% i would be sitting now enjoying the title of "INVENTOR OF C+++ ".

And btw, Dani doesnt make up the titles, it has a pattern, if only u observed.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

That's the same as my code, except that my code splits it into 8-byte blocks... Thanks for your reply, but unfortunately it didn't help.
Greetz, Eddy

Can you please post the output you are getting as well as a bit briefing on the feat you are trying to achieve and the program specifications ?
Maybe then i can try to do somehting.

Hope i am not asking too much, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe this would help you finding the actual fault in your program:

void encipher(unsigned int num_rounds, unsigned long* v, unsigned long* k) {
    unsigned long v0=v[0], v1=v[1], i;
    unsigned long sum=0, delta=0x9E3779B9;
    for(i=0; i<num_rounds; i++) {
        v0 += ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]);
        sum += delta;
        v1 += ((v0 << 4 ^ v0 >> 5) + v0) ^ (sum + k[sum>>11 & 3]);
    }
    v[0]=v0; v[1]=v1;
}

void decipher(unsigned int num_rounds, unsigned long* v, unsigned long* k) {
    unsigned long v0=v[0], v1=v[1], i;
    unsigned long delta=0x9E3779B9, sum=delta*num_rounds;
    for(i=0; i<num_rounds; i++) {
        v1 -= ((v0 << 4 ^ v0 >> 5) + v0) ^ (sum + k[sum>>11 & 3]);
        sum -= delta;
        v0 -= ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]);
    }
    v[0]=v0; v[1]=v1;

}

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

won't u forgive me for 1st mistake in my 1st post!!
If u don't have any technical sugestion about the problem over which I have shown some effort at least then plz don't send them.
This may discourage others!

Buddy we not discouraging anyone, we just need the code i mean the complete code which you have written to understand the problem at hand and help you out. And by the way we no discouraging anyone, just asking a little dedication from your side so you can one day program with the basics on your fingertips.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Compiler list and starting resources.

http://www.daniweb.com/techtalkforums/thread50370.html

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

~s.o.s~ would it be more correct if i made all of my = into ==

Simply put it this way, when u want to compare some values you use the comparision operator which is == .
When you want to assign a value to a variable you need to use the assignment operator which is = .
Simple as abc.

So wat u want to do in ur current case ? U want to compare the values inputted by the user isnt it ? SO use the comparision operator. That will set you right and make your program work.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

the only thing i can think of is that there might be something wrong with the compiler.

from my code then pleas look over my code and tell me what the problem might be

Blaming the compiler is no way of solving the problem and the solution to your problem i have already stated in my previous post. Look there.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

ok i was just fiddiling around macking this program to see what would happen and it worked fine but for some reason now it doesnt do what the program tells it to do
this is my code

int main()
{
int taco,pizza,chicken,hamburger,hotdog,;
cout<<"from 1 to 3 enter what taco is then press enter";
cin>>taco;

[I][B]if(taco=1)[/B][/I]{pizza=2;}
[I][B]if(taco=2)[/B][/I]{pizza=3;}
[B] [I]if(taco=3)[/I][/B]{pizza=4;} // 3rd stmt

cout<<"taco="<<taco<<"pizza="<<pizza<<"chicken="<<chicken<<"hamburger="<<hamburger<<"hotdog="<<hotdog;;
system ("pause");
}";

The lines which i have underlined in your code are the statements which are causing problem to you. What you wanted to do was some condition checking but ended up assigning new values to the variable "taco" and overwriting the ones inputted by the user.
Hence your third stmt if (taco = 3) .... ends up assigning the value of 3 to taco and not checking whether the taco variable is 3 or not. That stmt alogn with the stmst i have highlighted should use the == operator instead of using the assignment operator which is = .

SO just put if (taco == 3) and like wise in your code and it should work fine.

Also using the system ("pause") to make the prog wait is considered bad programming practice since it invokes the OS specific routine "pause". Use getchar () instead, it achieves the same purpose.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A new stack frame. There's just one stack (in C, anyway), and you normally don't make copies of it.

I think i should start using "Activation record" to avoid typing mistakes !!

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@joshilay
I don't think you get rvalue required errors.

Maybe he just wanted to know the difference between the L and R values ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes what Mr. Salem has said is perfect and if you want a more detailed account then you can try here.

http://msdn2.microsoft.com/en-us/library/bkbs2cds.aspx

Hope it helped, bye.

Grunt commented: Helps +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

the function
void fun()
{
char c;
if(c=getchar())!='\n')
fun();
printf("%c",c);
}
Gives the output cba .Can't say why?

This must have happened when you must have given the input "abc" isnt it ?

The above function is basically an example of a recursive function or basically a function which calls itself. Hence the above prog waits for the user input and keeps on accepting it until the user presses a Return or Enter key on the keyboard. And when the return key is pressed the entered input is printed in reverse order.

One note though, recursive functions if used improperly can cause stack overflow since each time a recursive function is called a new stack is allocated for the function.

Maybe this will give some info about the recursive functions
http://www.dsi.unive.it/~arch/corsoC/subsection3_9_5.html

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Turbo C++ is an age old compiler and not used by anyone nowadays let alone be used for professional development. Also it supports many non standard functions which might just start you funny ideas about using commands like getch () and gotoxy (int x, int y) and lots more.

And Dev C++ and CodeBlocks are not compilers but Interactive Development Environments (IDE). The compiler used in both the IDE's is Mingw compiler.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It would be better if u post the entire code without just propagating the updates like an AJAX enabled page :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Err... sorry, i aplogise to both you and Mr. Ancient Dragon. I blindly assumed some things in my mind and gave the answer which is not what i usually do.

Sorry if i misled my friends at the forums.
Hope you guys forgive me.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I thought i would help but am getting this output.

Starting to get XTEA key
XTEA Key:
Characters put inside buffer
Original buffer:        ◄♣¶
orig casted:            ◄♣¶
Encrypting...
finished encrypting...
encrypted:              -ÿ
ä-
starting to decrypt...
finished decrypting, value of retbuf:
end of decrypt:         ╥ÿφ4╩╠≈⌠½½½½ε■ε■
Decrypted:              ╥ÿφ4╩╠≈⌠½½½½ε■ε■
Size of encrypted string:       10

Is this what you are getting ?
Just wanted to confirm.

Bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Well i think an opensource software for your first attempt would really give your Software company a boost.

..and well also the type of publicity you use decides the future of your company.

Good publicity = Great future

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

:?:The statement *s1++=*s2++ actually leads to the assignment of value at s2 to s1 followed by incrementation of s2 then the incrementation of s1.

The above statements is illegal since to assign the value to the variable it must be an L value and any expression is not an L value. SO the above stms are wrong. The left hand side of the expresssion can only be a variable and not any expression or constant address.

The precedence of the post increment operator (++) is higher than the dereference ooperator (*). So the above stmts actually increase the address which the pointers hold and not the value pointed by them.

So to get the actual operation done you shold try something like:

(*s1) = (*s2)++;
(*s1)++;

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why, because you lied on your résumé about your abilities?

It doesnt matter even if he gets the technical questions coz in the interview they are bound to ask him to write a proram and then it would be all over.

@myques

You can try to google C++, Java, C techinical questions for Interviews and see what results you get.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe it's bull**** but as long as it is in the standards I can't deny it.

... and neither do you use it. ;)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Structures are just like normal variables hence can be passed to the functions in the same way normal variables. The difference between structures and normal variables is that structures are User defined data types.

Consider for example the function which accepts a pointer to a variable and manipulates it.

void changeInt (int *ptrToVaribleBeingModified)
{
   *ptrToVaribleBeingModified = 10;
}

And the same can be done when we pass a reference to structure in the function

void changeStructure (MyStructure *ptrToVaribleBeingModified)
{
   ptrToVaribleBeingModified->value = 10;
}
// here MyStructure structure has only one field namely int value

And in main we have

int main (void)
{
  int i = 0;
  MyStructure structInstance;

  changeInt (&i);  // now i becomes 10

  changeStructure (&structInstance); // value field becomes 10

  getchar ();
  return 0;

Hope it helped.
Bye.

Grunt commented: [Grunt] +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

speed is sometimes much more important than modularity or maintainability. I worked several years on a program that had to get data real-time from barcode readers on packages as the packages moved along an assembly line. Then the program had to look-up data in a database whose key was the barcode, format the data, and send it to a large-character printer that would print information on the side of the packages when they moved past the printer. All that had to be done in less than 1/2 second and management thought that was too slow. We even resorted to assembly language to squeeze out every millisecond we could.

Thats exactly the point i was trying to put forward, but as i belong to the new generation couldnt find a real world example. Thanks, this was the kind of example i was looking for.

*but in the end these ppl will say that nowadays as the computing speed and memory has increased the optimizations dont matter. Well in this case the argument continues...*

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I refuse to post a listing of all of the possible user titles, because it is incentive to keep on posting to see what your next user title will be!

Err... dont you think that those who use 5% of their brain would be able to find out the titles by looking at the members titles which have posts like in multiples of 500.

Just a thought.:idea:

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maintainability and readability are generally the 2 most important goals for any coder to aspire to (usually far more important than optimum speed & memory usage), its a good habit to get into.

Actully that is not true in all the cases.
For places or applications where the performance is of peak importance, optimum speed and memory do make a large amount of difference.

I dont mean that modularty is not important or you should go for speed more than modularity, just that it depends on the area of application in which the program is used.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I was not being rude, i just informed him that i did not ask that question, and restated my question Am I supposed to say 'yes that is what i asked', when it was not.

I very well understand that it was not your intension of being rude, thats why i went to the trouble of putting up the solution for you. I dont give a damn about rude people.
But what i said was not some kind of warning but just a reminder that including the word "please" would be more like it.

In case you dont know, the members of this forum are not bound in any way to help the people who post their problems here. Being actally polite and explaining the problem in depth would urge the people who see to posts to help you.

Hope you understand.
Bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@Lerner

Actually this is not what this guy wants.

He wants to pass the structure to the inbuilt qsort fucntion so that it is automatically sorted.

The technique for the above mentioned has already been posted by me.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I didnt ask how to refer to a specific member
I asked how do i pass to a proceudre

Please dont be rude when asking help. Such attitude wont fetch you any help. Mr. Lerner here is a senior member so restate your problem statement rather than asking just someone else to do it rudely.

BTW here is wat i think should suffice ur purpose:

typedef struct 
{
    char input;
    int value;
}List;

int compare (const void* source, const void* dest)
{
    List* listSource = (List*) source;
    List* listDest = (List*) dest;
    if ( (listSource->value) > (listDest->value))
        return 1;
    else if ( (listSource->value) < (listDest->value))
        return -1;
    else
        return 0;
}

int main()
{
     List myList[10];
     for (int i = 0; i < 10; ++i)
     {
         myList[9 - i].input = (char)i + 90;
         myList[9 - i].value = i;
     }
     for (int i = 0; i < 10; ++i)
     {
         printf ("\nThe list %d has character = %c and value = %d ", i + 1, myList[i].input, myList[i].value);
     }
     qsort (myList, 10, sizeof (List), compare);
     for (int i = 0; i < 10; ++i)
     {
         printf ("\nThe list %d has character = %c and value = %d ", i + 1, myList[i].input, myList[i].value);
     }
     getchar ();
     return 0;
};

If you dont understand any part just post again.

Hope it helped,
Bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This makes the program a little more modular.

Well forgive me for butting in, but here modularity is not an issue since he is not building a Library module but a small program.

As far as writing normal programs are concerned the coder should always be concerned with the best and the fast implementataion wrt to both memory requirements and speed.

But still this is just me, I thought just wanted to let you know.
Any constructive criticisms appreciated.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Its really simple thing for which there actually is no need to post on the forums. Just google the OOP concpet you want to get clarified and you would find a host of pages explaning the thing to you in detail.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Do NOT... For any reason go out and spend 90 bucks on a college style book... You'll only get disappointed. For some reason programmers like to try and dazzle you with their knowledge and fancy terms. To avoid this try going to Barnes and Nobles and pick up "The absolute beginners guide to C" for 20 dollars. I have never heard any of the people I recommended this book to complain about it.
That and don't be ashamed of the "C++ for dummies" books either. They have foot notes you can remove from the book and some come with free compilers.
The greatest thing is that they are in laymans terms so you can actually read and learn the material besides just sit with a thesaurus and guess the terms.

Is this the reason why these books never mention the complexity of scanf function, never mention that using gets after scanf may result in disaster, never mention that fgets is the best way to take in strings, never mention that fflush (stdin) has undefined functionality ?

These things appear in the posts of programmers which try to dazzle and show you their knowledge dont you think so ?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Ho ho ho, here comes the Queen of Dani Web ;)
Welcome back.

*rubbing my hands gleefully*
....*maybe i will get some rep for this he he he*

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It would be really better if you start from the basics rather than jumping in the middle of nowhere. If you dont understand the code there is no point in makin it run.

Still if you want the working code, you can try a new implementation of the MD5 algorithm HERE.

Hope it helped,
Bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Well if you want to run the program in real time then you need to reconsider your idea since in the end you would end up seeing the final value in the text box (due to the fast execution of your program) or until you run out of buffer.

Maybe you need to implement a delay which would update the contents in the text box at regular intervals of time.

char text[1000000] = {'3'};
for ( i = 0; i < sizeof text - 1; ++i )
   {
      this->richTextBox1->Text = text;
      strcat(text, "0");
      // some delay function
   }

This is what i think should come, but still i would like Dave to verify this for me coz this is just the logic i think should be used.

Hope it helped, bye.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

That helps you by telling you that no point in driving on the highway if you dont even know how to ride a cycle, which would in the end cause you trouble.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It's like trying to explain fire to a caveman. It doesn't matter what you say, all they can do is "oooh" at the pretty colours and "argh" when they touch it.

I have tried the same approach with the original poster but to no avail. Goodluck to you. :)