I think it will be quite instructive to run Algorithms A and B with progressively increasing 'n'. That way, you will be able to regress the relationships appropriately. This will make it possible to derive a relationship of the form O(a*n^b) for each. taintransit
taintransit
Posts
-
Algorithm Complexity -
Dificulty ifintegrating an old C++ code into Visual C++Thanks a million jhwurmbach. You have just halted my one week of sleepless nights. Thanks also to David Crow, Cedric Moonen and James Twine for all your suggestions. taintransit
-
Dificulty ifintegrating an old C++ code into Visual C++Yes you are right. The angle brackets were eaten up in the post. Cedric Momen pointed this out in his response. jhwurmbach suggested that I avoid pre compiling the headers. It worked! Thanks every body. taintransit
-
Dificulty ifintegrating an old C++ code into Visual C++I wrote a C++ code for analyzing texts few years ago and it works perfectly. I am now trying to make it a windows-based application by integrating it into Visual C++ using visual studio. This has been an ache! I first got fatal error C1010: Unexpected end of file while looking for precompiled header directive. It was not too difficult to correct this as there are many similar experiences recorded in various discussion groups on the Internet. However, when I added #include "stdafx.h" as directed in various responses to the c1010 error on the Internet, I got the following errors error C2095: syntax error: 'function-style cast' error C2226: syntax error: unexpected type 'T' error C2095: syntax error: ')' and a number of other similar errors. All these were generated by a code line 1 below: 1 template T max(T x, T,y) 2 { 3 return (x > y) ? x : y; 4 } any ideas on what could be wrong? taintransit