Do you need all 60000 rows of the file in the vector at the same time? If not, then why not check for duplicates when the file is read? e.g. Read a line, check if it already exists in the vector. ...
Type: Posts; User: Ancient Dragon
Do you need all 60000 rows of the file in the vector at the same time? If not, then why not check for duplicates when the file is read? e.g. Read a line, check if it already exists in the vector. ...
>>Is there a way to make my program portable and let it read wherever it the (projectname).exe is located
It alreay is doing that. Just copy the program to some other folder and you will see it...
>>My question is, has anyone here been in the army (doesn't matter which one)?
Which ONE ?? Which ONE?? There is only ONE Army. We take that sort of thing pretty darned seriously. I was in the...
MS-Windows specific: console program can call _onexit() to install an event handler which is supposed to get called whenever the program terminates for whatever reason.
1. are the functions in that library C or C++? it makes a difference.
2. do you have UNICODE turned on? It is turned on by default.
3. If the functions are C and your program is probably...
>>int main(int argc, char *argv[])
c++ standards did not change the way main() is declared. Its the same in c++ as it is in C. You might check boost libraries to see if it has a class that...
go to www.amzaon.com and search books for "COM". It will give you 389769 Results. But Inside Com is a good starter
where are those three functions declared? Are they in a library that you failed to include in the project or in another *.cpp file that you didn't add to the project. You have to find out where...
>> Is there a faster way to find the position to insert the node ?
Not normally -- and thats just one of the big advantages of doubly-linked lists.
you don't need that prev pointer at all. Just keep track of head and tail as it does now. I didn't compile or test this, so use it at your own risk!
ClIterator Insert(ClIterator p_position,...
DirectX is MS-Windows. If you really really want to start from scratch them you can use X11R6 or newer libraries which I think are in the /usr directory. But that isn't really for beginners and...
Well, duua! we are talking about inlining verses not inlining. inlined functions will ALWAYS make the program run faster than functions that are NOT inlined. This has nothing at all to do with...
Nothing false about it. When the program does not have to call a function then it makes the program a tad bit faster. So where is the folly in that statement? This is not the same as saying the...
inlining always helps speed up the program, but it may also make the program larger. Whether it helps or not depends on what you want to do -- do you want the fastest running program or do you want...
time_t is NOT a variable, but it is a typedef for an unsigned int. So what you posted is the same as this
int main
{
unsigned int <<<wrong
}
This is incorrect because you did not...
>>but is there something better more reliable?
there are better functions, depending on what you want to do. I'd suggest that the functions in <ctime> are quite adequate for your purpose, it...
>>save.write(reinterpret_cast<char *> (this), sizeof(this));
this is a pointer, and the size of any pointer is a constant value, 4 on 32-bit compilers. add the asterisk (star) in front of this to...
I think C99 standard allows this
cin >> n;
int salaryarray[ n ];
or, since this is a c++ program, you might use a vector
or use substr().
if (!shipheight.empty())
{
std::string::size_type pos = shipheight.rfind('\n', shipheight.length() - 1);
if (pos != std::string::npos)
{
shipheight =...
If you look on M$ website it will show you the differences. They are all the same compiler, the difference is the extra stuff that is added to the package.
get the sdk. Naturally, like anything that M$ produces, using a M$ compiler would provide best results, although others might work ok too.
did you follow all the installation steps ?
I installed boost last night and am using the same compiler. Took me a little while to figure out just how to set up the project to use the libraries. After creating a console program, I had to add...
because he may not be using boost. I would like to but my co won't let me. :(