User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 397,820 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,546 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 18 of 18
Search took 0.01 seconds.
Posts Made By: brahle
Forum: C++ Mar 5th, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C++ advice (scanf/printf)

Who's misdirecting? I think it is you all the time who is misdirecting. If you need a lot of data to be written, you deffinetly won't use screen, but files.
There isn't everything in the beauty of...
Forum: C++ Mar 5th, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C++ advice (scanf/printf)

Sorry, but i don't see your point. Instead of using the cout to view the differnce, i used cerr and i rerouted output to a file. These are the results i got:
printf: 0
cout: 0.10989
When i rased the...
Forum: C++ Mar 4th, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C++ advice (scanf/printf)

You didn't understand me. I wanted to say that you may save run time when you use printf() and scanf(), not your time. I also think that if you are a good competitor, you must have enough time to...
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C and C++ Timesaving Tips

Try writing a bigger constant, like 100,000,000. :cool:
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C++ advice (scanf/printf)

The man was standing right next to me.
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C and C++ Timesaving Tips

1. And what makes you so clever? Although I am not a sexist, I think that programming isn't 4 woman. Why? I don't remeber any of the great women coders (if you know any, please enlighten me!!!) and I...
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C and C++ Timesaving Tips

You say you know more about c++ than a man who is included in the development of that language? I somehow don't think so....
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C and C++ Timesaving Tips

Have you ever been to competitions? I have, and I know that cin and cout ARE slower. You want proof, here it is. The same program that only writes 100 000 000 bytes of data.
#include <cstdio>
using...
Forum: C Mar 3rd, 2006
Replies: 13
Views: 5,786
Posted By brahle
Re: palindrome problem

1. It is consistent to the competition coding, and i don't know to code in other way. I always use things that are proved to be faster or much much easeier to code.
2. Okay i won't do that any more.
Forum: C Mar 3rd, 2006
Replies: 25
Views: 22,799
Posted By brahle
Re: String to integer conversion

Haven't you guys heard for sprintf()? it is used as printf(), just the first element must be a *char. They are defined in header cstdio.
Forum: Computer Science and Software Design Mar 3rd, 2006
Replies: 1
Views: 1,884
Posted By brahle
Re: Help on Gamma Function

http://mathworld.wolfram.com/GammaFunction.html
go to that page if you don't know what is the gamma funcition.
Forum: C++ Mar 3rd, 2006
Replies: 6
Views: 1,533
Posted By brahle
Re: Dev C++ Hates me

that is half c, half c++. If you want a code in C++, it would look like this:
#include <iostream>
#include <string>
using namespace std;

int main( void ) {
string name;
char buff[257];
cout <<...
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 9,828
Posted By brahle
Re: C and C++ Timesaving Tips

Always use scanf() and printf(). They are much, much faster than cin and cout. Also use stl algorithms, like sort, reverse and find, especialy if they are member functions of a container class you...
Forum: C++ Mar 3rd, 2006
Replies: 6
Views: 2,630
Posted By brahle
Re: (Noob) need some help w/ Prime Numbers

Do you know what is the definition of the prime number? It is a number that has no other diveders other than one and itself. You tested the number to itself (every number devides it self, doesn't...
Forum: C Mar 3rd, 2006
Replies: 13
Views: 5,786
Posted By brahle
Solution Re: palindrome problem

this should work...
#include <cstdio>
#include <algorithm>
#include <string>
using namespace std;
const int NULA = 0;
string a, b;
char buff[1026];

int main (void) {
Forum: C++ Mar 3rd, 2006
Replies: 40
Views: 36,928
Posted By brahle
how to convert int to binary?

the best way to do this is to use the bits. The code would be:
inline string to_binary( const int &x ) {
int t;
string ret;
if( x > 0 ) t = x; else t = -1 * x;
for( int i = 0; i < 32; ++i )
...
Forum: C++ Mar 3rd, 2006
Replies: 40
Views: 36,928
Posted By brahle
Re: C++ Performance Tips

it can't be used if operator+ and operator- arn't defined!!!
and you don't have to use another variable, in C++ standard, there is the STL. It is the strength of C++ because there are lots and lots...
Forum: C++ Mar 3rd, 2006
Replies: 30
Views: 525,789
Posted By brahle
Re: C++ Random Numbers

I say djgpp is way better than Borland. Frist of all, djgpp is a Gnu software. Secondly, you can use much more memory than in Borland's compiler. In the end, in most of the competitions the djgpp is...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 6:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC