I just noticed that this is exactly what MS excel does with the FIXED function....
How can I emulate this
Type: Posts; User: msshapira
I just noticed that this is exactly what MS excel does with the FIXED function....
How can I emulate this
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
if you say so...
thanks
being part of a school assignment, we are explicity forbidden to use STL...
therefore, this is one of those cases....
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...
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...
good idea!!!
thanks a million
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...
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...
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, .....
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)
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;
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...
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...
Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
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...
obviously!!!
please explain why it's not a good idea to put a using declaration in a 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...
is it correct to say this function (Dijkstra) will work with negative values (costs to go from node to node)?
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?
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...
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?...
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
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...
obviously!!
i should have written
&matrix[currentC][currentR]