I would like some advice on how to track down what seems to be a compiler bug in Microsoft Visual Studio (VS) 2008, but I am not sure. It could be something I could fix, but I have no idea how to approach it.
I have a hybrid parallel code that uses both MPI, for control of tasks, and OpenMP...
Thanks again, Salem. Now the proper coding is crystal clear to me.
To all: Danny Kalev of the Devx forum has answered the question of why the limit is 509. The real limit is 512. the other three files are stdin, stdout, and stderr. You can find the Devx thread here...
Salem,
Thanks. I looked at the link for FOPEN_MAX and then I looked at <stdio.h> where it is defined. FOPEN_MAX is #defined as 20. How does that explain my being able to open 509? In fact, I do not include <stdio.h>. I do include <cstdlib>, <iostream>, and <fstream>. Are you aware of...
I have written code that opens a series of files, without closing any of them (for a while), and stores the handles in an array of fsteam* pointers. I've compiled and run the code using Microsoft Visual C++ .NET 2003 under Windows XP. The code is a console application that runs in a CMD...
Thank you very much for pointing me in the right direction. I am surprised to be so old fashioned. I learned C++ about 6 years ago. We have a recent graduate working here who has not heard of these things. So, it looks like we need some new books. Well, onward and upward. :)
I have an...
I have been using Microsoft Visual C++ 6.0, and I just installed the .NET version, Visual C++ 2003. I converted a standard C/C++ console application from 6.0 to 2003 by opening the workspace file and accepting automatic conversion. Link and compile settings seem to be carried over. On...
Commonality of GUI is a major concern, as described above. There are also some minor differences with native C code and libraries. These need to be understood and bracketed out with #DEFINE and #IFDEF / #ENDIF directives. For example,
1. The formats of binary data stored in files may be...
Ah, yes. Thanks Alboy. I remember that now. My problem with that approach was that I wanted Administrator and myself (two different users) to share the same mailboxes, and the only convenient way I could find to do that was to select an option that stored the Eudora files in a specified...
This recent thread describes multiple accounts through the menu tools / personalities.
thread13-24286
1 have used those personalities, but as I recall this method works only when one user has different mail servers he wants to check. All the messages get put into single In and Out boxes...
Thanks, Ian. I was afraid of that from my test results. Does anyone know of another keyboard input library, preferably contained in standard C / C++? If not that, then something free. Maybe with source? I would like to run it on different platforms.
I want to read a single character from the input stream and take immediate action when I do so. For example,
char answer;
cout << "Type 'y' to continue" << endl;
answer = cin.get();
if (answer != 'y') return 0;
// continue
The problem is that when I use cin.get(), getchar()...
Ha! I just noticed that my program is wrong owing to windows using little endian word format. The bytes of the int stored in temp are reversed. Oh well.:) Glad atoi worked.
Oh, I see you are trying to interpret argv[]. That is easier -- just plain parsing. It is self-contained on the platform. Word length is not an issue. Just convert the sring to an int. No casting needed.
#include <stdlib.h>
tempint = atoi(temp);
You must have an actual int stored in temp...
char* is an address of a byte or byte array. That is, temp points to the first byte of an array of characters. temp, a pointer, cannot be cast into an int. If you happen to have an int stored in the first two or four bytes (sizeof(int)) of temp[], then you can convert the data with
// casts...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.