Posts
 
Reputation
Joined
Last Seen
Ranked #618
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
77% Quality Score
Upvotes Received
15
Posts with Upvotes
13
Upvoting Members
13
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
4
7 Commented Posts
0 Endorsements
Ranked #540
~76.5K People Reached
Favorite Forums
Member Avatar for super-duper

Abstract Data Types is a way to generalize/model software so that the same interface used with different implementations and types. Standard Template Library is a good example of Abstract Data Types. For example the interface for stack is independent of the implementation. Under the hood stack may be implemented by …

Member Avatar for rucha_1
0
2K
Member Avatar for charming-_-eyes

[CODE] std::stringstream out; for(size_t i=0; i < size; i++) { int x = digit[i]; x = x >> i; // do something to digit out << x; } [/CODE]

Member Avatar for Satya Raj
0
500
Member Avatar for John Linux

Objects and thread work together well. Try to model your problem in terms of classes. For example Shuttle can be designed as an active class

Member Avatar for Sergio_1
0
506
Member Avatar for Azmah
Member Avatar for ravenous

Comparing floating point numbers using == or != is not safe. The difference between the two numbers must be compared to some tolerance, usually the system epsilon. (see sample code below). [code] bool isEqual( float v1, float v2 ) { if( std::abs(v1-v2) < std::numeric_limits<float>::epsilon() ) { return true; } return …

Member Avatar for santakdalai90
0
306
Member Avatar for iamthesgt
Member Avatar for markshah2
0
625
Member Avatar for nnaaddrr

Stuff is always hard at first... Take a stab at it, write some code to get started..

Member Avatar for Narue
-2
120
Member Avatar for ztdep

[CODE] bool isSame(double a, double b) { return std::fabs(a - b) < std::numeric_limits<double>::epsilon(); } [/CODE]

Member Avatar for ztdep
0
1K
Member Avatar for gregarion

34 is the right answer two minus becomes plus [url]http://wiki.answers.com/Q/Do_a_minus_and_a_minus_make_a_plus[/url]

Member Avatar for tkud
0
119
Member Avatar for Saith

max is most likely 2, because you must be passing 2 Code presented is incomplete, so its hard to figure out why.

Member Avatar for Saith
0
335
Member Avatar for surferxo3

What is your intent of distance=0? You already initialized the contents of array. Seem like you can just remove that statement. [CODE] void Graph::initialize() { for(int i=0;i<numOfVertices;i++) { mark[i] = false; predecessor[i] = -1; distance[i] = INFINITY; } [B]distance = 0; //here is the problem...[/B] } [/CODE]

Member Avatar for template<>
0
209
Member Avatar for ocramferreira

If you are permitted to do so, you can perhaps load your text file into a std::set and use that as your dictionary.

Member Avatar for iamthwee
0
567
Member Avatar for GamerXxX
Member Avatar for andylbh

Perhaps a custom sort on the vector might solve your problem. See attached link for ideas [url]http://stackoverflow.com/questions/1380463/sorting-a-vector-of-custom-objects[/url]

Member Avatar for mike_2000_17
0
783
Member Avatar for QuesoTaco

Do do not need to or want to put your executable in VC folder. set the path to location of dumpbin (there should be a batch file that sets this path) and run dumpbin on your executable where it is currently locationed

Member Avatar for template<>
0
550
Member Avatar for programing

Perhaps an expression evaluator such as below... [url]http://www.arstdesign.com/articles/expression_evaluation.html[/url]

Member Avatar for template<>
0
122
Member Avatar for Ertzel

This is an observer pattern problem. [url]http://sourcemaking.com/design_patterns/observer[/url] Therefore you need an observer, which keeps a list of all dependents. When an update is received observer loops through and updates all dependents. Using one thread per client is not going to scale very well if you intent to have many chatters. …

Member Avatar for template<>
0
1K
Member Avatar for shadowscape

[url]http://linux.about.com/library/cmd/blcmdl1_md5sum.htm[/url] [url]http://www.gnupg.org/[/url]

Member Avatar for template<>
-1
258
Member Avatar for tonysun

C++ does name mangling to ensure method/function names are unique, C does not. So when calling C function from C++ you need to let C++ know it’s a C function. This can be done using the extern "C", read below for examples [CODE] extern "C" { #include "header.h" } [/CODE] …

Member Avatar for tonysun
0
4K
Member Avatar for eman 22

try using gettimeofday, will give you usec rather than seconds sample code [url]http://www.daniweb.com/software-development/cpp/threads/361138[/url]

Member Avatar for eman 22
0
185
Member Avatar for mbouster
Member Avatar for eman 22

If you have a pointer to array, you can use it as an array... [CODE] int main() { int a[]={1,2,3}; int* p=a; int val=p[0]; } [/CODE]

Member Avatar for mike_2000_17
0
85
Member Avatar for pravej

try it in c first, just for fun. Here is something to get you started, complete the function, use algorithm described by Narue.. [CODE] char *reverse( char *input) { } [/CODE]

Member Avatar for template<>
0
243
Member Avatar for cableguy31

[CODE] struct timeval { unsigned long tv_sec; /* seconds since Jan. 1, 1970 */ long tv_usec; /* and microseconds */ }; [/CODE]

Member Avatar for template<>
0
340
Member Avatar for CodyOebel

perhaps something like this [url]http://stackoverflow.com/questions/5265607/how-to-send-double-click-on-keyboard-focused-object-from-c[/url]

Member Avatar for template<>
0
145
Member Avatar for Gnomy

Seems, fine, ensure you have the correct headers. [CODE] #include <vector> #include <string> int main() { std::vector<std::string> TexName; TexName.push_back("mega.png"); return 0; } [/CODE]

Member Avatar for template<>
0
543
Member Avatar for arun srinivaas
Member Avatar for hag++
0
139
Member Avatar for IndianaRonaldo

1. Allocation means to create space for your application use 2. Initialize means to assign specific values to that space Using malloc creates space, but contents of space undefined

Member Avatar for IndianaRonaldo
0
211
Member Avatar for pritpal.singh88
Member Avatar for sergent
0
930
Member Avatar for template<>

Hello Community, I am trying to figure a simple way approximate cost of context switching for a given OS/hardware combination under different loads. For example on my 2 GHz dual core MAC OSX, running single instance clocks at 0.5 usec where as three instance at 1.3 usec. Below is sample, …

Member Avatar for template<>
0
379