Pseudorandom algorithms432 (12/21/2005 12:34:43 AM) comp.lang.c I need a pseudorandom algorithm that produces same results with same seed across different platforms. I'm not sure, but I think that standard rand() does produce different set of numbers on different platforms.... Tatu
Implementing dirname with C++ strings.221 (11/24/2005 7:40:03 PM) comp.lang.c++ I need to implement simple function to get current directory from program directory. e.g. /home/tatu/src/main -> /home/tatu/src where main is the currently running program. i.e. argv[0] == /home/tatu/src/main.... Tatu
Are recursive functions ever needed?2724 (10/1/2005 12:16:50 PM) comp.programming Are recursive functions ever needed, i.e. cannot you just replace them with iterative clauses? Example: b = func (func (func (a))) compared to: b = a; for (i = 0; i < 3; i++) { b = func (b); } ... Tatu
Using class inside itself319 (5/30/2005 12:07:46 AM) comp.lang.c++ I have a class: class Complex { public: double x, y; Complex () {x = 0.0; y = 0.0;}; Complex operator * (Complex); Complex operator / (Complex); Complex conj (void); private: }; Complex Comp... Tatu
viewing depencies526 (5/17/2005 8:57:22 PM) comp.programming Is there any small app that can inspect a set of source files so that it could list for every function and extern where it is used. For example: .... foo_function_1 (): apples.c bananas.c apples.h foo_functi... Tatu
Tracker programming/programs243 (2/5/2005 6:37:08 PM) comp.programming Is there any open source project with following kind of file format: As we know, any sample can be constructed from basic sine waves with frequency, phase, and amplitude information. If we take this informat... Tatu
Passing pointer array to function1136 (12/12/2004 2:02:27 AM) comp.lang.c I have a struct: typedef struct { char **user_comments; int *comment_wds; int comments; char *vendor; } vorbis_comment; void func (char **table) { return; } int main (void) { vorbis_comme... Tatu
vc.user_comments[i] = string; /*crashing*/824 (12/6/2004 8:02:37 PM) comp.lang.c Have this kind of struct: typedef struct { char **user_comments; /* ... */ } vorbis_comment; /* prototype */ char * read_vorbis_string ( FILE *sc); /* problem */ vc.user_comments[i] = read_vorbis_string (... Tatu
Is FALSE == 0?1733 (11/20/2004 1:03:59 PM) comp.lang.c Is FALSE == 0? In other words, does 'function ()' execute on all platforms: if ( (1 == 2) == 0 ) function (); if ( (7!) == 0 ) function (); I would like if you could point to some definition of the c langu... Tatu
Problem with printf formats1622 (12/20/2005 11:11:37 AM) comp.lang.c I have following code: int main(void) { printf("%.3lf\n",-2158470*0.001); } it prints -2158.470 How can i disable '0' at the end, if they are not needed ? Is there a possibility just to write %lf and just... guenther.sohler(63)
Optimization1530 (11/26/2005 5:17:59 AM) comp.lang.c is there any ulternative metho to optimize the following piece of code (for loop) main() { int i,j; for(i=0;i<40000000;i++) j=1; } just wanna know how to optimize the for loop; i know the code has no logic..... amalhashim(17)
Implementing dirname with C++ strings.221 (11/24/2005 7:40:03 PM) comp.lang.c++ I need to implement simple function to get current directory from program directory. e.g. /home/tatu/src/main -> /home/tatu/src where main is the currently running program. i.e. argv[0] == /home/tatu/src/main.... axel86(74)
Getting Involved with Open-Source Projects327 (11/24/2005 6:43:39 AM) comp.programming Thank you for the insight thus far. I have been rather interested in becoming part of an open-source project, but feel that I do not posess the prowess necessary to contribute anything useful. I don't even k... jeffrey.whiteside(4)
function automatically returns the value1235 (11/23/2005 3:31:36 PM) comp.lang.c hi All, function automatically returns the value,am not used "return" i am using Linux -gcc complier please tell me.... what is problem... source ===== #include main() { int a,b,c,sum; printf("ENTER ANY THR... N.Chellappa(47)
OT pc died836 (11/17/2005 4:57:29 AM) comp.os.linux.hardware This is not strictly linux related, but I hang out in the linux groups cause I only run linux, and so I'll ask here. This is what happened. I was happily running FC4, but was kind of running out of space, so I... amadeus841(163)
pre-amp for PC microphone431 (11/7/2005 5:45:56 PM) comp.os.linux.hardware I have a standard mass-market microphone for my PC (electret, 3 k-ohm impedance). But it's not sensitive enough. I have to get very close to the microphone for it to pick me up. How can I get an amplifier to... ward1(6)
Exiting from loop3920 (10/24/2005 2:34:02 PM) comp.lang.c++ If I'm having nested loops like: for (...) for (..) for (...) { /* exit here */ } and I need to exit from there ^ . Is it better to use exceptions or goto or some other method? ... vineoff(23)