CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: manojg

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Re: print floating number with only zero before decimal in scientific notation

    Thanks a lot.
  2. print floating number with only zero before decimal in scientific notation

    Hi,

    I like to print a floating number in scientific notation but with only zero before decimal, like

    1.2345

    to

    0.12345E+01
  3. Re: how can i convert write() procedure to cout?

    Not following what you mean. Can you clarify it more?
  4. Replies
    3
    Views
    1,291

    Re: a simple question

    Thanks.
  5. Replies
    3
    Views
    1,291

    a simple question

    Hi,

    What is the difference between


    double a = 4.5;

    and
  6. Replies
    2
    Views
    1,296

    g++ 4.1.2 vs 4.6.1

    Hi,

    I have a code containing few classes. They compile and run fine with g++ 4.1.2. But with g++ 4.6.1, it does not recognize some methods inside the class. For example:



    class first
    {
    ...
  7. Replies
    12
    Views
    1,576

    Re: Class inside the same class

    Hi monarch_dodra,

    You are right, it is just splitting the class. I wrote this way to solve one of my problem temporarily (I was writing the data in a file, a type of formate which can also write...
  8. Replies
    12
    Views
    1,576

    Re: Class inside the same class

    HI Lindley,

    Thanks for reminding me. I have assigned a virtual distructor but I forgot to write in detail here.


    class singleParticle {
    private:
    double x;
    double y;
    ...
  9. Replies
    12
    Views
    1,576

    Re: Class inside the same class

    Hi all,

    Thanks everybody for your helpful suggestions. I figured out to do this way which similar to previous one:

    I created a base class for just one gas particle, "singleParticle", and...
  10. Replies
    12
    Views
    1,576

    Class inside the same class

    Hi,

    I am writing a simulation code. I have a class called "particle" which hold gas particles. Each gas particle has its neighbouring gas particles. And its neighbouring gas particles have their...
  11. Thread: small puzzle

    by manojg
    Replies
    7
    Views
    755

    Re: small puzzle

    Thanks guys for reply. I found the answer. In the package that I am using, one can run the code directly without compiling. But in case of vector, somehow one need to compile.
  12. Thread: small puzzle

    by manojg
    Replies
    7
    Views
    755

    Re: small puzzle

    Hi Lindley,

    Yes, its title input in class declaration is const char* that is why I have used title.c_str(). It crashes even if I use other methods of myClass which return some number. Also, it...
  13. Thread: small puzzle

    by manojg
    Replies
    7
    Views
    755

    Re: small puzzle

    Hi,

    I am using third party software, and myClass refer to one of them.
    GCDEF, yes that is what I was assuming but somehow it is not working. Ok, I will check again.

    Thanks a lot for your...
  14. Thread: small puzzle

    by manojg
    Replies
    7
    Views
    755

    small puzzle

    Hi,

    I have been puzzled by this simple code:


    vector<myClass*> cVect;

    char ch[10];
    for(int i=0; i<5; i++) {
    sprintf(ch, "%d", i+1);
  15. Replies
    7
    Views
    831

    Re: longest double number

    Ok, Thanks a lot everybody.
  16. Replies
    7
    Views
    831

    longest double number

    Hi,

    I have a data file with double variable with length > 30 (like: 4354.568324349349273282372837283).
    When I read and print out the number (in c++), it prints out correctly upto 20 digits...
  17. Replies
    3
    Views
    1,115

    Re: about execl function

    Ok, Thanks a lot.
    Is there any way to execute perl script within c++ code without replacing it? I tries system() but I have to give numerical argument to the perl script.

    Thanks again.
  18. Replies
    3
    Views
    1,115

    about execl function

    Hi,

    First time I am trying to use execl() function to execute a perl script in my c++ code. As a test I used something like this:


    int main()
    {
    execl("/home/user/abc/test.pl",...
  19. Replies
    11
    Views
    1,260

    search speed in c++

    Hi,

    If I have a long vector (say of size 800000) then it takes time to search a number in the vector especially if the number is near the end of the vector. However, in editor like vim, search is...
  20. Replies
    3
    Views
    509

    could not store class

    Hi,

    I have written a small class and tried to store in vector.

    -------------------------------------------------------------------------


    class subClas {
    private:
    Float_t fX;
  21. Replies
    1
    Views
    566

    a simple question

    Hi,

    I have a very simple question.

    "ptr" is a pointer to a "struct", "value" is a member (there are other members also) of this "struct" and "x" is an integer. What does following code return:...
  22. Re: difference between including header file and shared library.

    Thanks a lot everybody.
  23. difference between including header file and shared library.

    Hi,

    What is the difference between including header file (.h) and including shared library (.so) in C++ code?

    Thanks.
  24. Replies
    8
    Views
    995

    Re: strange behavior

    I am writting a code for a Monte-Carlo simulation. Yes, it is better to use loop instead of "goto". In my actual code, there are three arrays xp[n], yp[n] and zp[n] for position of objects. Also,...
  25. Replies
    8
    Views
    995

    Re: strange behavior

    Thank you very much everybody for your suggesion.


    Yes, it creats the array on heap so that it can be deleted. Can't we define small array on stack?

    The array size defined is 200. Does not...
Results 1 to 25 of 55
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured