Page Number: Página 1 de 1
Actual Results
- billstack
- Foro: Programming / Scripting / Coding Forum
- Tema: word which occurs most
- Subject: word which occurs most
- Respuestas: 1
- Vistas: 1235
- Subject: word which occurs most
Posted: Octubre 30th, 2003, 12:13 am
Howdy, The following piece of code will do what you want. It is a modification of an example originally written by Fred Swartz (hence the comment at the top). I found this online, and then modified it slightly to do what you want. It makes heavy use of STL, which may not be what you are looking for....
- billstack
- Foro: Programming / Scripting / Coding Forum
- Tema: Need help in C... about malloc....
- Subject: Need help in C... about malloc....
- Respuestas: 6
- Vistas: 1671
- Subject: Need help in C... about malloc....
Posted: Octubre 29th, 2003, 11:55 pm
Oh yeah, I forgot to mention that using a variable named "T" is not a good idea. With the advent of C++ and templates, T has become a standard (and very popular) type-name placeholder for template parameters. Using "T" in other ways can therefore be a little misleading.
Cheers!
Cheers!
- billstack
- Foro: Programming / Scripting / Coding Forum
- Tema: Need help in C... about malloc....
- Subject: Need help in C... about malloc....
- Respuestas: 6
- Vistas: 1671
- Subject: Need help in C... about malloc....
Posted: Octubre 29th, 2003, 11:50 pm
Hi dmx1999, You have not mentioned what Position is defined to be. However, I replaced all instances of Position with TreeNode*, and then made a small modification to make your program work. It didn't investigate why malloc crashes, I just noticed that you are not allocating space for the new string...
- billstack
- Foro: Programming / Scripting / Coding Forum
- Tema: Same Question on FILE!
- Subject: Same Question on FILE!
- Respuestas: 2
- Vistas: 1073
- Subject: Same Question on FILE!
Posted: Octubre 1st, 2003, 12:54 am
If you want to use files, then do something like the following. A more effecient approach would keep everything in memory, but this may not be what you want. Also note that '\n' can become different character combinations on different systems, so I modified your original code to use (char)10 as the ...
- billstack
- Foro: Programming / Scripting / Coding Forum
- Tema: MASSIVE database programming....solutions?
- Subject: MASSIVE database programming....solutions?
- Respuestas: 6
- Vistas: 1949
Posted: Septiembre 30th, 2003, 10:14 pm
As for getting up and running quickly with a minimal cost to you (both $$ and time) I would use PHP with MySQL. I am a programmer by trade, and as such have had plenty of experience with C++ and the like. However, until quite recently I have not delved deeply into web/database programming. Over the ...
