Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
0 Endorsements
Ranked #2K
~11.0K People Reached
Favorite Forums
Favorite Tags
Member Avatar for akshayabc

Q1: Alternative 1 Q2: If the function X returns an integer, uses standard calling convention (and possibly is not dynamically linked, I'm not sure about the actual meaning of __declarespec(import)). Q3: .obj is most oftenly compiled code, all functions and variables from a compiled source file. .lib I think contains …

Member Avatar for gayathri balu
0
176
Member Avatar for meabed

And the number one rules of optimization is??? DO NOT (Atleast not untill you _know_ you need to, and then only where you _know_ it will make a difference, eg profiling). On a side not I recently tried some wtl and they have a rather nifty technique for avoiding virtual …

Member Avatar for Lisa1110
3
1K
Member Avatar for hike34

Another reply solue due to the fact that goole desktop for some reason wants to propagate these questions now and then... I wanna say RTFM, but I can include the escape the escape hint... Use \\ for a literar \ in C/C++/Java/(Just about any other application that uses \ escapes …

Member Avatar for clemente
0
150
Member Avatar for DotNetUser

Sugestion: Use regex, produces just about the fastest searches possible (you need a external library thought, I doubt it comes included in vc++ atleast I havent seen it, boost.org is one good source).

Member Avatar for DotNetUser
0
198
Member Avatar for Aldin
Member Avatar for thehakan
Member Avatar for thehakan
0
103
Member Avatar for TimC

What is wrong with using the functions you already got [code] void Sequence::move(int from, int to) { SeqItemType item = find( from )->item ; remove(from) ; insert( to, item ) ; } [/code]

Member Avatar for TimC
0
140
Member Avatar for Dabdob

Well here is as modern as you are like to get, and all free [url]http://msdn.microsoft.com/vstudio/express/visualc/default.aspx[/url]

Member Avatar for perniciosus
0
188
Member Avatar for ferrant

Template arguments are <class _Value, class _HashFcn, class _EqualKey, ... > You probably only need to redifine _HashFcn thought... [code] struct newHashFnc { size_t operator(const Point3D &p3d) { return p3d.x << 16 | p3d.y << 8 | p3d.z ; // or any other mixing you'd like } } ; ... …

Member Avatar for perniciosus
0
142
Member Avatar for atrusmre

Because you dont release the memory ? (There is no delete matching the new)... (However most implementations of delete would not actually return the memory to the system anyway, it would just put it in the local free lists)... *Edit) If you wanted to allocate lots of memory and be …

Member Avatar for perniciosus
0
520
Member Avatar for nabil1983

Try reading up on quicksort in general... The loop (lines 2-9) make sure that all the low values are in one range and the high values in the other... The recursive calls (lines 10,11) then does the same for these fixed subsections, untill the trivial case of one or two …

Member Avatar for perniciosus
0
116
Member Avatar for Jon182

switch only operate on a single integer value... however since a char is smaller than an integer I suppose you could stack it in one value and then do the switch [code] value = ((value << 8) & 0xff) |file.getch() ; switch( value ) { case ('j' << 8 | …

Member Avatar for perniciosus
0
117
Member Avatar for Naveena

Aha... implicit function declarations ! Rather weak thought, but it feels the same as saying something that can not be done in c but in c++, both are complete turing machines and can as such do everything a turing machine can (I heard somewhere that the template language in c++ …

Member Avatar for dwks
0
143
Member Avatar for akshayabc

1) Just work your self out from the middle, if they are given in k&r they describe them in k&r ? [inlinecode]char(* (*f())[]) ()[/inlinecode] [inlinecode]*f()[/inlinecode] => f is function pointer taking zero arguments returning [inlinecode](* ... [])() [/inlinecode] => returning array of pointer to functions returning [inlinecode]char ... [/inlinecode] => …

Member Avatar for Narue
0
300
Member Avatar for heavyc

IANAAP (I Am Not An Assember Programmer) but, some thoughts: Feels like there is as many ways to write assembler as there are assemblers thought... What is the problem ? Argh, whats up with the k variable in the c++ example (not declared) ? and counting goes in different directions …

Member Avatar for heavyc
0
186
Member Avatar for ilikerps

Well you got a strange compiler, mine outputs hello, hi... the constArray[0] points to the static string "hello", if you want to point at the pointer pointing to hello you gotta do &p... allocating a new char is just a memory leak since the pointer gets overwritten in the next …

Member Avatar for ilikerps
0
119
Member Avatar for nabil1983

Suggestion, use qsort of stdlib.h (I think)... you only need to write the compare function and specify the struct size.

Member Avatar for perniciosus
0
184
Member Avatar for SNA

Saying perhaps it is and the can, but me does not understand (courtesy of our favorite translator babelfish)...

Member Avatar for perniciosus
0
181
Member Avatar for SpS

Well my first hunch was no ofcourse there would be no difference calling how you call a static member function, the class / object would only be used by the compiler to mangle the name... Thought I usually ask my compiler for help, a test program says more than a …

Member Avatar for SpS
0
117
Member Avatar for prasath

Well the only book I read is Introduction to Data Compression, it contains a couple of chapters on Text compression... However this is mainly theoretical, and probably more use for understanding than fast implementation (I dont think I saw even any pseudo code in there)... But it might be a …

Member Avatar for perniciosus
0
144
Member Avatar for btech

These things are more easily done using yacc and bison... I have a vague recollection about some statements of implementability of these types of grammar on a stack based machine so I suppose it should be possible... You probably want to save full tokens on the stack instead of just …

Member Avatar for perniciosus
0
129
Member Avatar for j1979c

I have been stuck in your corner for quite a while, guess I ran out of time... I also recommend that first book since it will tell you what all those classes in MFC does, really... (Saw an example here a while ago... the MFC way was CMenu *cMenu = …

Member Avatar for jwenting
0
201
Member Avatar for nabil1983

[inlinecode]man[/inlinecode] is your saviour, do [inlinecode]man qsort[/inlinecode] or get your libc.hlp from devcpp if you are on win... for a struct of type [code] struct tuple { char artist[50]; char album[50]; char label[50]; int year[4]; char type[30]; } array[ MAX_NUM ], *sorted_array[ MAX_NUM ] ; [/code] a view sorted by …

Member Avatar for perniciosus
0
110
Member Avatar for Dabdob

A somewhat odd introduction to ruby... (an interpreted language, with features comparable to python, or so I've heard). [url]http://poignantguide.net/ruby/[/url]

Member Avatar for Rashakil Fol
0
96
Member Avatar for Operator

Short note, since you seem to have io well in hand just do [inlinecode]man fopen[/inlinecode] and you will have what you need... (You can use the same functions for files as for standard input/output if you have a FILE* pointer)...

Member Avatar for Dave Sinkula
0
148
Member Avatar for iqbal

[code] bool Siblinb::operator<( const Sibling &other ) { return age < other.age ; } ... #include <algorithm> ... std::sort( siblingobj, siblingobj + num_siblings ) ; ... [/code]

Member Avatar for Dave Sinkula
0
240
Member Avatar for diddle

Lol, so now I'm not an expert on linux utilities but I enjoy tinkering with it now and then... This is one way to solve _this_ problem, somehow I thought it would be possible to use the -k flag for start of key value for sort (btw this is not …

Member Avatar for dwks
0
86
Member Avatar for tyczj

damn it I wanted to delte this post... but since it wont do try some simple variation of dfs or bfs just counting the steps taken...

Member Avatar for tyczj
0
180
Member Avatar for DotNetUser

[QUOTE=DotNetUser]That's correct. If I have a global function in main that is "SendMessage" to socket, will I be able to call it from a class? My instance of the GUI class is not allowed to be global. How would I get around this? My callbacks needs to use some functions …

Member Avatar for perniciosus
0
116
Member Avatar for Mistro116

Hmm, a tricky question (well it took some time to figure out what you are doing anyway)... It looks as thought you dont save the recursive result anywhere so that even if you get a match somewhere in the recursion you will only report a match if you get a …

Member Avatar for Mistro116
0
175