Search:

Type: Posts; User: blue_gene

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    6,133

    can anybody tell why it is not working ? how can...

    can anybody tell why it is not working ? how can i get the time complexity graph ?
  2. Replies
    10
    Views
    6,133

    >x is the value of n, say...

    >x is the value of n, say 10,20,50,100,200,500,1000,......
    >y is time, how long it took to deal with a sample size of your chosen 'n'

    here i tried this way...but failed.



    #include<stdio.h>...
  3. Replies
    10
    Views
    6,133

    thanks for clearing my doubts. but i dont...

    thanks for clearing my doubts.

    but i dont follow how do i plot the complexity of the graph...

    >>From a pragmatic point of view, you run your code with lots of values of n, and attempt to plot...
  4. Replies
    10
    Views
    6,133

    hi salem....you are saying n is the number of...

    hi salem....you are saying n is the number of data elements.

    but in this code,

    for ( i = 0 ; i < n ; i++ )
    This is O(n)

    n may be a simply loop invalidation index instead of
  5. Replies
    10
    Views
    6,133

    question on time complexity

    here is a very fundamental question.... many a times i have seen if anybody wants to talk about performance of a code then they refer time complexity . what exactly does it mean ?

    my confusions...
  6. Replies
    2
    Views
    6,020

    thanks salem.....you are right. i found that...

    thanks salem.....you are right. i found that mistake. now it is ok
  7. Replies
    2
    Views
    6,020

    debug assertion failed !

    i am getting "debug assertion failed " while running code. what does it mean ?

    the messages are .....


    debug assertion failed !

    program c:\sss\debug\sss.exe
    File fprintf.c
    line 56
  8. Replies
    22
    Views
    5,329

    >>"const T &" is not a pointer, it's a constant...

    >>"const T &" is not a pointer, it's a constant reference to type T.
    ....hmmm.


    thanks.....you guys are very helpful and cordial. i understand where i was wrong......i learned a lot. its ok.
  9. Replies
    22
    Views
    5,329

    >>if you create a vector of int then you push...

    >>if you create a vector of int then you push back an int, if it's a float then push_back float, if it's MyObject then push_back MyObject, if it's a container for pointers to MyObject then push_back...
  10. Replies
    22
    Views
    5,329

    i am so sorry. its working. may be that was a bad...

    i am so sorry. its working. may be that was a bad copy.i checked again. this time its working.

    did you notice push_back() is taking a pointer p . but when i usued pointer p in my original...
  11. Replies
    22
    Views
    5,329

    g++ compiler....

    g++ compiler....
  12. Replies
    22
    Views
    5,329

    >>I believe alphaoide's solution will work..... ...

    >>I believe alphaoide's solution will work.....

    its giving compile error. i already checked that in my system . i copied and pasted.

    edit: i have ideas on ur example. i was curious to know...
  13. Replies
    22
    Views
    5,329

    just a quick question by looking ur code. ...

    just a quick question by looking ur code.



    int num = 10;
    vector<int*> vec;
    vec.push_back(&num); // u r sending a pointer(address ) but push back demands alias . pointer(here by using & )...
  14. Replies
    22
    Views
    5,329

    no that code was an example. my las question was...

    no that code was an example. my las question was not meant for that.

    forget about my code.



    my question > is it possible to create a vector<some_type *> ?? how do i insert pointers into the...
  15. Replies
    22
    Views
    5,329

    ok,....it is written void push_back( const TYPE...

    ok,....it is written void push_back( const TYPE &val );

    so, pass by reference (alias).

    i have written a small code to see the behaviour...



    #include<iostream>
    #include<vector>
  16. Replies
    22
    Views
    5,329

    is push_back() a overloaded function ?

    hi, is push_back() a overloaded function?

    bcoz, probabily push_back() accepts simple argument and also pointer both.

    is it a overloaded function ? if so, is there any other way acceptance...
  17. Replies
    8
    Views
    32,254

    ....but this is giving multiple beeps in my...

    ....but this is giving multiple beeps in my system.



    #include<iostream>

    using namespace std;

    int main()
  18. Replies
    12
    Views
    2,214

    but this code is working !! #include...

    but this code is working !!


    #include <iostream>
    using namespace std;

    int* func(int* y);
    int main()
    {
    int m = 4;
  19. Replies
    12
    Views
    2,214

    hello , can anybody say what was wrong in arian's...

    hello , can anybody say what was wrong in arian's code ? which line is wrong ? is it when the function returning ??
    can u point out the mistake in that code ?
  20. Replies
    6
    Views
    1,927

    thanks jlou and elad ....i read ur explanation....

    thanks jlou and elad ....i read ur explanation. you have explained well. i have got some more questions reading your material.

    questions are....
    >>If you passed the stream in like you did the...
  21. Replies
    6
    Views
    1,927

    operator overloading

    hi, i have some idea about operator overloading . in fact i have practised one sample program for addition of complex number by overloading '+' operator. those were simple program to implement and...
  22. Replies
    12
    Views
    1,412

    >>>I do a lot of right-shift or left-shift when...

    >>>I do a lot of right-shift or left-shift when I'm trying to optimize code by getting rid of pesky division/multiplication operations

    ...but that is limited. is not it ? bcoz bit shifting means...
  23. Replies
    12
    Views
    1,412

    hunter, i dont have any idea about window API....

    hunter, i dont have any idea about window API. so your code is out of my bound . i was expecting a simple example.

    in fact i was expecting a simple bit level example. i think it is only for...
  24. Replies
    12
    Views
    1,412

    what is |= operator ?

    what is |= operator ? how it works ? can anybody give simple example ?

    is it a bitwise OR operator ?

    for example var1 = var1 | something

    when i should use it ?
  25. Replies
    16
    Views
    2,002

    hi salem..i tested the code. output...

    hi salem..i tested the code.

    output
    -----------
    g++ t.cpp
    ./a.out
    0xbfffe560 0xbfffe560 // same address

    thanks for that solid code. your answers are always to the point .....thanks...
Results 1 to 25 of 92
Page 1 of 4 1 2 3 4