General C++ Programming - May 2013

Faster memcpy routine
 
//It can be further enhanced by making it 64bit. unsigned long copy_linear(void* read,void* write,unsigned long size); //speed up the memcpy process! u...
[11 replies] Last: OP will not be able to produce code faster than standard strxxx(), mem... (by Duthomhas)
by Daleth
"Translation" vs. "Compilation" unit
 
Which is the correct term? I've seen both thrown around, but a couple times I see people correcting others who write "compilation unit." Or are they two dif...
[2 replies] Last: The definition is pretty much unchanged across C and C++ language defi... (by Cubbi)
Using Char in a Menu/While Loop
 
Hi guys I'm working on a project that uses type char instead of type int to make selections in a menu that calls functions. I'm really hitting a wall with the w...
[1 reply] : Lines 30 and 52: They will always resolve into a true statement. The "... (by Daleth)
rename all files in a folder
 
Hello everybody! I need help I want to rename all files in a folder (exactly I want to change extansion file example:"FILE0001.CHK" to (FILE0001.JPG)), i know ...
[1 reply] : $ ./a.out FILE*.CHK int main(int argc, int argv){ for(int K=1; K<... (by ne555)
Help! Random number generate
 
Is it possible that have a function or class can generate independent random number . And I can use it any time. Thanks.
[3 replies] Last: using rand() is not exactly independant. There is Mersenne Twister. (by DeXecipher)
a more manual use of glut?
 
Hey guys, I've been having an issue with glut and have looked around and still cant seem to figure out, I am using glut to draw the window for an openGL proj...
[1 reply] : You shouldn't have a problem using the keyboard from glut using glutKe... (by mik2718)
Linked List Sorting Algorithm
 
This is the algorithm I have so far and it works great. I was wondering what other people think?? Comments/Critiques?? void LinkedList::sort() { if (head...
[14 replies] Last: You could just 1. allocate an array of Node pointers of size length 2... (by mik2718)
Reading Multiple text files
 
Hi, I want to know how to read multiple text files in this program... I have 5 text files(order1,order2,...order5) Can anyone pls help me with this? I use D...
[3 replies] Last: Hey I also have another problem can you pls help me with that. I anot... (by naveen19)
ifstreambuf_iterator Problem
 
#include <algorithm> #include <iostream> #include <iterator> #include <vector> //============ WRITING A VECTOR INTO A FILE ================ const int DIM=...
[4 replies] Last: Thank you all. I used a binary file and only passed values through a l... (by knowNothing)
sos who can help me ......
 
i dunno the significance of the following code , look at the following...code #include <ystdex/container.hpp> // the question is that i can't find the file i...
[6 replies] Last: ah its a predicate sorry. Try to make it a function ptr instead of a r... (by DeXecipher)
Question about custom allocator?
 
I want to see how the STL containers manage their memory. So I write an Allocator that inherited from the std::allocator. All the funcs just print a message and...
[6 replies] Last: rebind converts an allocator for one type to an allocator for another ... (by Cubbi)
by plexus
"datatype" auto
 
When I first read about the new "datatype" auto in C++11 I was like WHAT??? You kidding, right??? Does any serious programmer use this keyword? I mean: ...
[12 replies] Last: > to prevent horribly long lines of code. Yes, that. Also, to write e... (by JLBorges)
by dem7w2
Passing a polymorphic array entry
 
I'm having an issue during the linking stage of the .exe during compile time, and it's because of a call to a function with a polymorphic parameter. //here's h...
[1 reply] : A bit more stumbling around and I figured out it wasn't a polymorphic ... (by dem7w2)
by xxeus
How to create auto clicker+typer in C++ ?
 
Okay so what I want to do is :- Create a program that can, say for example, switch to an already opened up google search page. Type in a given string and pres...
[1 reply] : I need to know how to control the mouse Emulate mouse messages: http:... (by MiiNiPaa)
Parsing through large data sets
 
Hi everyone, So I'm attempting to write a program that will parse through a large file (genome sequences) and I'm basically wondering what options I should c...
[5 replies] Last: std::vector<bool> optimises space but compromises access time. 1G is ... (by kbw)
Templated function error: no matching function for call to
 
Hiya all I posted to fast ... I figured it out, Sorry! Still learning and have not got to templates yet and am lost ... Trying to compile the latest [url=htt...
[2 replies] Last: # g++ -v Using built-in specs. Target: i386-undermydesk-freebsd Conf... (by SloppyJoe)
implementation of function in BST to return parent with biggest son/sons
 
I got a code of a BST and i need to create a function that will return the value of the parent that it's son/sons sum to the biggest sum - BST and not AVL. i...
[1 reply] : guys please help - i am absolutely frustrated with this question (by Netanelwallach)
by grubby
need help in stack and queue!! please
 
Hi,I am a c++ beginner. I am using vs,and I got a problem in my code which check a sentence whether a palindrome or not. #include <iostream> #include <stack>...
[7 replies] Last: while ( character != '\n' ) { if ( character != ','&& character !... (by abhishekm71)
by Daleth
Clarification on the usefulness of the "!!" idiom (1,2)
 
http://stackoverflow.com/questions/1310344/why-use-when-converting-int-to-bool In the comments below the accepted answer, there is a mini-debate on why one s...
[24 replies] Last: @ helios I try to read and understand your posts (not always successfu... (by buffbill)
by andmon
How to get Numerical Hessian from alglib
 
Dear all, Is there a way to get the value of the numerical Hessian at the minimum (using BLEIC algorithm) in alglib, please? A
[no replies]
May 2013 Pages: 123... 47
  Archived months: [apr2013] [jun2013]

This is an archived page. To post a new message, go to the current page.