When doing more than one variable declaration makes sense to put the * correctly, or you do not get what you expect. When writing: char* a,b,c; you get the equivalent of: char *a,b,c; and you would probably expect: char *a,*b,*c;
JesperMadsen123
Posts
-
Why does most C/C++ developer prefers char *c instead of char* c? -
Sloppy Code - thoughtsUse a tool for codeformatting, make sure to run it before you commit your code, or make your editor format your code. Codeformatting "by hand" is waste and should be eliminated.
-
how can i make parameter that take a period of months as a parameter in c# crystal reportsOne options would be to allow setting a "from/start" date, and a number of months as a regular integer parameter, e.g. from a textfield or combo box. Then in your C# code create a date range as: public DateTime CalculateEndDateOfRange(DateTime startdate, uint months) { DateTime endtime = startdate.AddMonths(months); return endtime; } Check as similar question here... http://stackoverflow.com/questions/4454271/date-range-in-days-c[^]
-
Threading problemI am sure you can find a solution for adding more producers, if you are good at lock-free algorithms. This page suggest that it is not impossible. http://www.1024cores.net/home/lock-free-algorithms/queues
-
3 way byte mergeSome ideas of the top of my head.. Can you interleave the input data for the function _b,_g,_r so they might fit caches better? Maybe you can unroll some of the loop, iterate in 12 bytes at a time 4 * 3, and store as 3 uint* operations... The last of the column w % 4 (i think) must be performed by your current loop (between 0 and 3 operations).