Search Results

Showing results 1 to 18 of 18
Search took 0.01 seconds.
Search: Posts Made By: brahle
Forum: C++ Mar 5th, 2006
Replies: 39
Views: 15,957
Posted By brahle
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: 15,957
Posted By brahle
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...
Forum: C++ Mar 4th, 2006
Replies: 39
Views: 15,957
Posted By brahle
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: 15,957
Posted By brahle
Try writing a bigger constant, like 100,000,000. :cool:
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 15,957
Posted By brahle
The man was standing right next to me.
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 15,957
Posted By brahle
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: 15,957
Posted By brahle
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: 15,957
Posted By brahle
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>...
Forum: C Mar 3rd, 2006
Replies: 13
Views: 10,247
Posted By brahle
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: 32,047
Posted By brahle
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 Mar 3rd, 2006
Replies: 1
Views: 2,267
Posted By brahle
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: 10
Views: 2,634
Posted By brahle
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];
...
Forum: C++ Mar 3rd, 2006
Replies: 39
Views: 15,957
Posted By brahle
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: 3,241
Posted By brahle
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: 10,247
Posted By brahle
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: 47
Views: 65,148
Posted By brahle
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;...
Forum: C++ Mar 3rd, 2006
Replies: 47
Views: 65,148
Posted By brahle
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: 890,200
Posted By brahle
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

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC