Search:

Type: Posts; User: L.O.K.

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. I got it. thx.

    I got it. thx.
  2. How to allocate memory for array of pointers using "new"?

    I want to make an array of pointers to (int) using "new".

    int * a = new ???? ; // (int *) (99) ; ???


    thx

    /* If you think my question is unclear, please tell me. I am not an English...
  3. Replies
    1
    Views
    857

    Question about UML.

    For this diagram:
    http://chorist.mis.ccu.edu.tw/teaching/CCU931-PL/final/final_5.jpg
    Let's talk about the class "S" and "T" only.
    Should I write like this:


    class S{
    public:
    void setID();...
  4. Replies
    5
    Views
    2,164

    Still can not solve the problem. thx I am...

    Still can not solve the problem. thx

    I am using MS VC++ 6.

    //==============================//

    It is OK now ~~ sorry for bothering. THANKS . :p
  5. Replies
    5
    Views
    2,164

    NO, sorry, i use "int main()" in normal times. ...

    NO, sorry, i use "int main()" in normal times.

    I wrote the "void main()" this time is for quick testing.

    I correct it now.

    thx
  6. Replies
    5
    Views
    2,164

    About "fstream" in and

    I run this is OK, "d.txt" is created and "12" is appended.


    #include <fstream.h>

    int main(){
    fstream file;
    file.open( "d.txt", ios::app );
    file.write( "12" ,2 );
    file.close();
  7. Thx all , I will study about these things more...

    Thx all , I will study about these things more deeply,.
  8. I' m sorry. I am a Chinese. thanks for helping

    I' m sorry. I am a Chinese.

    thanks for helping
  9. how to do printf( "%c", 12 ); via ostream cout ??

    how to do
    printf( "%c", 50 ); and also printf( "%d", 'a' );
    via
    ostream cout ??


    thx
  10. thank..~

    thank..~
  11. char *a="123"; a[1]='A';//In VC++ has error, TCPP doesn't have

    strange problem,


    int main(void){
    char *a = "123456";

    a[2] = 'a' ;

    printf( "%s", a );
  12. oh ~~ i see , one is Global, one is not. I saw...

    oh ~~ i see , one is Global, one is not.

    I saw some one write in the 2nd form. (he is not an expert); hehe!

    ths
  13. OK , i understood now. thank .'

    OK , i understood now. thank .'
  14. What is the diff. to write prototypes inside main() and before ??

    1:

    void function();

    int main(void){
    return 0;
    }

    void function(){}
  15. Oh, thx so much.

    Oh, thx so much.
  16. char a[99]; sizeof(a); //

    char a[99];


    sizeof(a); // <<--- How does "sizeof" work to know the no. of elements is 99 ?? I am wondering if there is a place in the memory to store the 99 ??
  17. OK, well, now I've understood, FAQ:"The return...

    OK, well, now I've understood, FAQ:"The return type of main() must always be an int, this allows a return code to be passed to the invoker."

    and ,i'm sorry, , What is the meaning of cast?

    thx.
  18. O~~ thx.. my Eng. is poor.. i want to ask...

    O~~ thx..

    my Eng. is poor..

    i want to ask how C knows that the no. of element is 99 ??

    and ,, can we get 99 in other method of sizeof(a)/sizeof(a[0]) ??

    just want to know..
  19. does C remember the no of elements in the Array??

    int a[99];

    there are 99 (int)s memory allocated.

    why we use sizeof( a ) , it can output 198 ?

    why it knows ? where does it store the no of elements?
  20. How to pass a pointer to a function that can change to addr of the pointer?

    //in this way:


    void ChangeAddr( int **b ){
    *b = (int*) malloc( ... );
    }

    void main(){
    int *a ;
    ChangeAddr( a );
  21. Replies
    2
    Views
    1,500

    thx, but how do i create CDC obj'z dynamically? ...

    thx, but how do i create CDC obj'z dynamically?

    like this form ,



    N = 99;

    for( i=0 ; i<N ; i++){
    //CDC *cdc = new CDC();
  22. Replies
    2
    Views
    1,500

    MFC: "CDC" obj. Array

    i want to make a CDC obj's Array, using MFC,

    CObArray, CPtrArray, tried these 2.,



    CPtrArray A;
    A.Add( &CDC::CDC() );
    A[0]->..... not OK
  23. Replies
    5
    Views
    3,413

    O, something new to me. what about the int...

    O, something new to me.

    what about the
    int AfxMessageBox(......);

    and

    char * itoa( .... .. ) ;

    i always use them without catching the returns.
  24. Replies
    5
    Views
    3,413

    Ok, now i know what is wrong in my program. thank...

    Ok, now i know what is wrong in my program. thank you very much!!

    i know that the CDC obj. is 1x1 at first.

    how to resize it ??
    i can use SelectObject( BMP ) ; to resize, but i know this is a...
  25. Replies
    5
    Views
    3,413

    MFC, CreateCompatibleDC question.

    CDC twdc;
    twdc.CreateCompatibleDC(this->GetDC());

    //=== gen pattern ===//
    for( int x=0 ; x<99 ; x++ ){
    for( int y=0 ; y<99 ; y++ ){
    twdc.SetPixelV( x,y, x*x+y*y );
    }...
Results 1 to 25 of 88
Page 1 of 4 1 2 3 4