Search:

Type: Posts; User: msshapira

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: round .5

    by msshapira
    Replies
    19
    Views
    3,027

    excel FIXED

    I just noticed that this is exactly what MS excel does with the FIXED function....
    How can I emulate this
  2. Thread: round .5

    by msshapira
    Replies
    19
    Views
    3,027

    round .5

    Hi,

    I'm trying to find a prebuit cpp function (or C) which manipulates output:
    for the input of


    double a = 1.55555555
    b= (manipulated a)
    cout << b;
    i would like the output to be
  3. Replies
    7
    Views
    2,808

    if you say so... thanks

    if you say so...
    thanks
  4. Replies
    7
    Views
    2,808

    being part of a school assignment, we are...

    being part of a school assignment, we are explicity forbidden to use STL...
    therefore, this is one of those cases....
  5. Replies
    7
    Views
    2,808

    ok. so here it is... I'm not reading from a...

    ok. so here it is...
    I'm not reading from a file, rather i'm reciving input from user.
    I prefer to process the data only after i've collected all of it, so i can decide what allocations to make...
  6. Replies
    7
    Views
    2,808

    cin >> string // multiple lines

    Hi,

    I have written a method that takes data for an std::string and processes it.
    I now (taking a step back) want to get this line from user. the string may have multiple line.. (meaning that i...
  7. Replies
    3
    Views
    5,650

    good idea!!! thanks a million

    good idea!!!
    thanks a million
  8. Replies
    3
    Views
    5,650

    reset a stringstream

    I googled and googled, but i can't get any of the recommedations to work:
    i'm trying to cout a graph in a formated way,
    it work fine for the first vertex, (prints all the outgoing edges, but when...
  9. Replies
    3
    Views
    1,459

    i'm probably just wasting peoples' time. I...

    i'm probably just wasting peoples' time.
    I decided to use "atoi" for the conversion instead...
    i'm not sure if it's a legit function, but i've just had enough...
  10. Replies
    3
    Views
    1,459

    streaming - error

    Hi all,
    I have written this piece of code: it is supposed to recieve an istream with a string which is used to create a graph.
    the istream is of the follwing format:
    |vertex1,vertex2, .....
  11. Thread: ostream&

    by msshapira
    Replies
    5
    Views
    1,333

    so if i have a linkedList can i do somthing...

    so if i have a linkedList

    can i do somthing like


    ostream& operator << (ostream& out,const EdgeList & eList)
    {
    EdgeNode *current=eList->getHead();

    while (current!=NULL)
  12. Thread: ostream&

    by msshapira
    Replies
    5
    Views
    1,333

    this is a school assignment, a requirement is...

    this is a school assignment, a requirement is that the is a method that returns a char*
    can i not do somthing like:



    out = out << p;
    delete [] p;
    return out;
  13. Thread: ostream&

    by msshapira
    Replies
    5
    Views
    1,333

    ostream&

    Hi,
    I have this following method, wanting to add a string to a std stream
    the function toString() returns a pointer to a string. the question is, when I add it to a stream, does it create a copy...
  14. Thread: header file

    by msshapira
    Replies
    9
    Views
    1,089

    dunno, it's what i've been taught. whenever i...

    dunno,
    it's what i've been taught. whenever i want to protect a value and assure it won't be changed- pass as const ref...
  15. Replies
    2
    Views
    1,772

    Thank you, anon. You sure know how to recognize...

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
  16. Replies
    2
    Views
    1,772

    overloading

    Hi,
    i'm new with c++, and this is my first overloading
    in the last line of this .h file (marked), the compiler desagrees.
    it says:


    error C2143: syntax error : missing ';' before '&'
    error...
  17. Thread: header file

    by msshapira
    Replies
    9
    Views
    1,089

    obviously!!! please explain why it's not a...

    obviously!!!

    please explain why it's not a good idea to put a using declaration in a header file
  18. Thread: header file

    by msshapira
    Replies
    9
    Views
    1,089

    header file

    hi all,
    I guess i'm missing somthing, because this header file just won't complile.
    I get loads of errors....
    the first error is marked, (".... error C2143: syntax error : missing ';' before...
  19. Replies
    6
    Views
    1,672

    is it correct to say this function (Dijkstra)...

    is it correct to say this function (Dijkstra) will work with negative values (costs to go from node to node)?
  20. Replies
    6
    Views
    1,672

    so, in conclusion, what i have to do is add a...

    so, in conclusion, what i have to do is add a field for each node- .lowest, all not bother at all searching through it if it is lower than the lowest using the current path?
  21. Replies
    6
    Views
    1,672

    can't see your logic... if i hit from another...

    can't see your logic...
    if i hit from another node, how am i to know whether the path is better, maybe the cost is low through the new node because it has yet to go through some very expensive node...
  22. Replies
    6
    Views
    1,672

    again on recursion-paths

    Ok, here's my final for pathfinding:
    it works fine (all status start "CLOSED"), on matrices under 7*7, but it hangs on bigger ones. I've made it sweet and simple but not so efficient... any ideas?...
  23. Replies
    9
    Views
    3,296

    i gave it a 3X3 matrix when one of the values is...

    i gave it a 3X3 matrix when one of the values is -1000 and all the others are 1
    looking for a path from 0,0 t0 1,0 i was expecting -991 but got 2
  24. Replies
    9
    Views
    3,296

    but it's still not working.... (!!!!!!!!) ...

    but it's still not working....
    (!!!!!!!!)

    what's going wrong?? is there a problem with my logic?



    long int GetMin(Node** matrix,int currentR,int currentC,int endR,int endC,
    int...
  25. Replies
    9
    Views
    3,296

    obviously!! i should have written ...

    obviously!!
    i should have written


    &matrix[currentC][currentR]
Results 1 to 25 of 44
Page 1 of 2 1 2