User Profile

Collapse

Profile Sidebar

Collapse
babu198649
babu198649
Last Activity: Jun 18 '08, 09:42 AM
Joined: Sep 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • babu198649
    started a topic multithreading
    in C

    multithreading

    hi
    how to start learning multithreading. Is multithreading related to OS in which program is running.
    thanks in advance
    See more | Go to post

  • thank u for u r replys

    if a variable is newed twice then will the memory be allocated twice.

    Code:
    #include <iostream.h>
    int main()
    {
        int *i;
        i = new int; //newed first time
        cout<<&*i<<"   ";
        i = new int; //newed second time
        cout<<&*i; 
    }

    in the above code the variable i is newed...
    See more | Go to post

    Leave a comment:


  • babu198649
    replied to Square of asterisk in c
    in C
    hi geek biz
    in u r code u r decrementing the x value which is always less than c and hence it falls in to infinite loop.

    try this
    [code=c]
    #include<stdio. h>
    main()
    {
    int x, y, c=5;
    for (x=c; x>0; x--)
    {
    for (y=c; y>1; y--) //changed this line
    printf("*"); // changed this line
    printf("*\n"); // changed
    ...
    See more | Go to post
    Last edited by sicarie; Feb 2 '08, 02:46 PM. Reason: Code tags

    Leave a comment:


  • babu198649
    started a topic scope of dynamic variabe after program termination
    in C

    scope of dynamic variabe after program termination

    hi
    a variable is allocated in dynamic memory(using new and is not deleted) and the programs gets terminated .now does the memory allocated will become junk.

    Code:
    int main()
    {
    	int *i = new int;
    }
    if the above program is executed it just allocates 4 bytes in heap and the program gets terminated.

    does this allocated memory will never be free even after program termination.
    See more | Go to post

  • babu198649
    replied to object to string
    in C
    thank u much for u r replys.

    i wanted to create the objects of a class whose names should be the attribute name which are present in the xml file.

    this is because as the attributes in the xml files gets increased the code should not be modified.

    thanks for the examples provided.
    See more | Go to post

    Leave a comment:


  • babu198649
    replied to object to string
    in C
    thanks for reply
    there are two classes CLASSA and CLASSB.
    object of CLASSA is OBJA.
    object of CLASSB is OBJB.

    now
    CLASSA contains function FA()(return type of FA()is string) which returns(OBJA.FA ()) the name of object(ie.strin g, not the object itself)

    how to convert this string to object.
    See more | Go to post

    Leave a comment:


  • babu198649
    started a topic object to string
    in C

    object to string

    hi
    i have a function which returns object.
    how to get the name of the object .
    See more | Go to post

  • babu198649
    started a topic what happens when newed more than once
    in C

    what happens when newed more than once

    hi
    if we new more than once the same object does it allocates memory multiple times.
    See more | Go to post

  • does pointing to 0(NULL) will not point to data in 0th location
    See more | Go to post

    Leave a comment:


  • thanks......... ...........
    See more | Go to post

    Leave a comment:


  • object initialized to zero(not a pure virtual function)

    hi
    i saw a program which inside its class initializes another class object to zero.
    also if i initialize to some other number other than zero ,an error occurs.

    Code:
    Circle* cp = 0;
    this is not related with pure virtual function since it is an object not a function.

    can some one could explain what it is.
    See more | Go to post

  • babu198649
    replied to strange class declaration
    in C
    thanks......... ............... :)
    See more | Go to post

    Leave a comment:


  • babu198649
    started a topic strange class declaration
    in C

    strange class declaration

    hi
    i came across this following code could some one explain whats happening with the int refCount(ie.how can an argument be passed to an int) in constructor.

    Code:
    class SharedImage
    {
    public:    
        SharedImage() : refCount(0){};
        int refCount;
    };
    See more | Go to post

  • babu198649
    started a topic difference between static and global variable
    in C

    difference between static and global variable

    hi
    what is the difference between static and global variable
    See more | Go to post

  • babu198649
    started a topic how to get individual bytes of an int
    in C

    how to get individual bytes of an int

    hi
    i have an int (which is of four bytes). i have to fetch the individual bytes of an int(ie. storing it as 4 character) .


    how to get the individual bytes of an int

    bye :)
    See more | Go to post

  • babu198649
    replied to new , strucure and PROGRAM CRASH
    in C
    i have not posted the entire program .

    thanks for reply


    i have found the error.

    while newing the class i have allocated like this

    data = new xml_data;
    data->pVsipl_buffe r = new int(LOOP*COL);


    instead of square brace( [LOOP*COL] ) i have used curly brace((LOOP*COL)) .


    but it had compiled well but caused runtime error...
    See more | Go to post

    Leave a comment:


  • babu198649
    replied to complex object declaration
    in C
    thanks

    ie. a function returning the object of type class_name. right.
    See more | Go to post

    Leave a comment:


  • babu198649
    started a topic new , strucure and PROGRAM CRASH
    in C

    new , strucure and PROGRAM CRASH

    hi
    i have a structure xml_data


    struct xml_data
    {
    int prf;
    int *pVsipl_buffer;
    };




    i have declared and allocated memory like this in constructor

    data = new xml_data;
    data->pVsipl_buffe r = new int[LOOP*COL]//LOOP and COL are
    //#define(d) constants;
    xml_data
    ...
    See more | Go to post

  • babu198649
    started a topic accessing protected member functions in c++
    in C

    accessing protected member functions in c++

    hi
    is there any way to access protected member functions which is inherited in c++.

    thanks in advance
    See more | Go to post

  • babu198649
    started a topic object as function
    in C

    object as function

    hi,i came across a program where one line goes like this

    SQ_Config::inst ance()->readBoolEntry( "mount_devi ce", false)

    here i found that SQ_Config is a class but there is no function called
    instance().i had ran the program and it works fine.
    please clarify thanks in advance.
    See more | Go to post
No activity results to display
Show More
Working...