Search:

Type: Posts; User: l2u

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    790

    bad c code question

    Hello,

    I'm wondering why is the following code working (although it shouldnt):


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    main() {
  2. Replies
    1
    Views
    1,978

    polyphase extern sort in c++

    Hello

    I have implement polyphase extern sort with c++ and I have no idea where to start. I know a little about merge extern sort (the basics) and I've been wondering if there are any c++...
  3. Replies
    1
    Views
    1,765

    measure time complexity

    Hello

    I'd like to measure time complexity that its needed for some algorithm/function to complete in my c++ application. I'd like to have it in miliseconds, double format (example: 0.253ms)
    ...
  4. Replies
    7
    Views
    3,249

    big O notation question

    Hello,

    Been wondering what is the time complexity of algorithm if we erase all elements in a linked list?

    Also what is the big O notation (complexity) difference betwen erasing element in a...
  5. Replies
    2
    Views
    754

    Thanks for explanation!

    Thanks for explanation!
  6. Replies
    2
    Views
    754

    simple question about double

    Hello,

    Why wont the following code assign 0.5 to variable (double type):


    unsigned int num = 1;
    double d = num/2;

    Thanks for help!
  7. Replies
    1
    Views
    843

    graph (depth-search) question

    Hello,

    I got stuck at solving some problem.

    We have two cities that are connected with two roads and betwen those two paths/roads we have regional roads. We know the time that is needed to pass...
  8. Replies
    4
    Views
    1,034

    question about pow()

    Hello

    Why will the following code output integer c as 0 (null)?


    unsigned int c = pow( (double)2 , (double)1000);
    std::cout << c << "\n";

    What would be the proper way of calculating 2^1000...
  9. Replies
    19
    Views
    1,344

    I need that twodimensional bool array to write in...

    I need that twodimensional bool array to write in all possible combinations of 0 and 1 without repeating.

    So if I have a variable x = 3 (which means number of cells)

    There are 3^2 (8) possible...
  10. Replies
    19
    Views
    1,344

    Should that really work?

    Should that really work?
  11. Replies
    19
    Views
    1,344

    This will give me an error: bool **arr;...

    This will give me an error:


    bool **arr;
    arr= new bool[x][2];
  12. Replies
    19
    Views
    1,344

    I dont have to resize it once its allocated.

    I dont have to resize it once its allocated.
  13. Replies
    19
    Views
    1,344

    Because I'm not allowed to use vector.

    Because I'm not allowed to use vector.
  14. Replies
    19
    Views
    1,344

    multidmensional dynamic array

    Hello

    I need a 2-dimensional dynamic bool array with 2 fixed columns and dynamic number of rows.


    bool *name[2];
    name = new bool..?

    What would be the proper way of implementing it?
  15. Replies
    5
    Views
    6,900

    I looked at vector reference but I couldnt find...

    I looked at vector reference but I couldnt find 'find' member.

    Are you sure it exists?

    Thanks!
  16. Replies
    5
    Views
    6,900

    comparing vector elements

    Hello

    I have 2 vectors which I want to compare if they contain the same element(s) (not all elements, just some specific). They hold 'some class' objects.

    What would be the best way to compare...
  17. Replies
    14
    Views
    1,113

    Do you think its better to have static class...

    Do you think its better to have static class functions or global in such cases?
  18. Replies
    14
    Views
    1,113

    Is non-member function meant to be global...

    Is non-member function meant to be global function that takes a reference of datatype as an argument?
  19. Replies
    14
    Views
    1,113

    datatype is a map in my case and datatypes in...

    datatype is a map in my case and datatypes in both classes are the same.
  20. Replies
    14
    Views
    1,113

    design consideration

    Hello

    When you have particular function (which is just one) in more classes that does the same thing with some specific element (member) what approach do you take to solve that problem?

    For...
  21. Replies
    20
    Views
    1,841

    All the elements are added at the beginning (or...

    All the elements are added at the beginning (or in rare occasions such as if configuration file is reloaded). So then it shouldnt be a problem using a vector (which would after sort and erasing...
  22. Replies
    20
    Views
    1,841

    I never thought of that.. And after sorting it...

    I never thought of that..
    And after sorting it use unique algorithm so that the vector would keep unique elements at the first place and there wouldnt be need of changing types afterwards?
  23. Replies
    8
    Views
    1,048

    For looping through the containers.

    For looping through the containers.
  24. Replies
    8
    Views
    1,048

    naming iterators and other datatypes

    If you have more iterators inside one function, how would you call them?

    For instance:


    std::vector<std::string>::iterator vec_iter;
    std::vector<std::string>::iterator vec2_iter;...
  25. storing datatypes (typedefs) inside template class

    Hello

    Is it possible to do the following (without template argument list):


    Registry::Inside::Type some_type;

    with this code:
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4