|
concerning first question,
#include <iomanip>
using namespace std;
.
.
.
cout << setiosflags(ios::fixed)
<< setprecision(1)
<< 3.1415 << endl;
|
|
|
|
|
I just got upgraded from Visual C++ 6.0 to Visual Studio .NET 2003. I am trying to write a simple program but it cannot seem to find the damn iostream.h. I already tried just using <iostream> and <ios> but that did not work. What do i do?
|
|
|
|
|
Use #include <iostream> instead. The Standard C++ include files don't have the .h suffix.
|
|
|
|
|
It should be in the following directory (assuming you did your install in C:/Program Files).
C:/Program Files/Microsoft Visual Studio .NET/Vc7/include
If it is not in there then I'm afraid that I don't know what happened.
As a side note, this header is deprecated. you should inlcude iostream (no .h) instead which puts all the same stuff as iostream.h into the std namespace.
something like:
#include <iostream>
using namespace std;
John
|
|
|
|
|
Well, thanks to you both. So instead of #include <iostream.h> I do something like #include
using namespace std;
???
|
|
|
|
|
I see that the attempt to use brackets has screwed up my message and perhaps yours as well.
The include statement should look something like:
#include {iostream}
using namespace std;
where the curly brackets should be replaced by the greater than and less than signs (as usual for #include).
I is not necessary to put in the using directive but it makes things easier. Without it, you would have to explicitly scope each reference to the iostream elements like the following:
instead of cout, std::cout
instead of endl, std::endl
etc.
John
|
|
|
|
|
John is it? Thank you. You definetly seeem to know what you are doing. Name's Michael, by the way. I will try that.
|
|
|
|
|
IT WORKS!! IT FINALLY WORKS!! IT COMPILED!! I FINALLY GOT SOMETHING TO COMPILE IN VISUAL c++ .NET 2003!!!
|
|
|
|
|
I have another question... I am trying to write a program that uses the string.h library. Would the #include for that be
#include <string>
using namespace std;
????
|
|
|
|
|
When posting something where you need to type in #include <header.h>, use the < and the > provided under the text window, or type < for < and > for >.
And as for your question, yes, you should use
#include <string>
Godd luck, Michael !
~RaGE();
|
|
|
|
|
Hey thanks. So the header code i would type is
#include <string>
>
???
|
|
|
|
|
I use AddItem to add a new row to a MSHFlexGrid control and RemoveItem to remove a row. However, I have a little problem.
If I call RemoveItem and then I try to add a new row with AddItem the new row won't be displayed on the screen. Redraw property is set to TRUE by the way.
//i.e.
mshflexgrid.RemoveItem( nRowIndex )
.
.// some other stuff might go here
.
mshflexgrid.AddItem( nRowIndex )
// Display some text in the cells
mshflexgrid.SetTextArray(...);
When I call AddNewItem a new row is being added because I don't get any errors such as "Subscrit out of range" from AddItem or SetTextArray. The problem is that the row is not being displayed on the screen. Another thing that I noticed is that if I call AddItem twice only the second new row will be displayed.
//i.e.
mshflexgrid.AddItem( nRowIndex );
mshflexgrid.AddItem( nRowIndex + 1 );
The row with index nRowIndex+1 will displayed right after the row with index nRowIndex-1;
If I delete more than one row, let's say n rows then adding n+m rows will display only the last m rows being added. Am I missing something? Is there anything that I should do after I call RemoveItem()? I've tried Refresh() but that didn't work.
none
|
|
|
|
|
One of our applications was supposed to be purchased with every instrument we sell, and this distributor in Europe was supposed to buy a copy from us w/each sale, and send it to the customer. Turns out he only every bought one and for years has been redistributing it all over Europe!! Can I put something in my software to keep this from happening? Something simple?
TIA
mark.
Mark Malin
(00==[||]==00)
|
|
|
|
|
I don't know if your instruments have serial numbers but if it does then you can make the software read that number and work only with that instrument. I mean one copy of your software will work only with one instrument. Or you can limit the use of software by generating a unique computer ID based on the hardrive number or ethernet card ID, and then you should have your costumers contact you to get a serial number that works only for that computer ID. Now don't forget that the software can be cracked. These are very simple software protections.
none
|
|
|
|
|
The instruments don't have a serial number at this time, but the idea of generating a unique computer ID based on hard drive or Ethernet card would work. These are not advanced users, so they'd never figure this out. Thanks for the ideas.
mark.
Mark Malin
(00==[||]==00)
|
|
|
|
|
See:- http://www.inner-smile.com/nocrack.phtml[^]
The disadvantage with that method is what happpens when the user changes their hard drive etc?
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Hi all,
I have an issue I can't seem to overcome regarding compiling code in Win2k, that I had working in
the past under Windows 98.
All the code does is set up DirectDraw7, and then do some simple page flipping.
I get an Application Error -- 'The instruction at <blah> referenced memory at <bleh>. The memory could not be "written"'.
Interestingly, if I use my old Win98 compiled .exe, or if I recompile under 2000, it makes no difference. The program compiles and links, but as soon as it executes it crashes with this error.
Debugging step-by-step doesn't seem to help either, since it seems to jump straight to nasty system-level assembly code.
I had wondered if anyone here has had the same problem.
I wonder if doesn't perhaps have anything to do with the way I start up the app? Does anything here need to be changed?
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
Please, I would be most appreciative if anyone could help me at all with this... I have deadlines for a graphic application I need to code that are nearing.
If anyone needs to see the code, just let me know how I can get it to you (email/icq/IRC etc.)
Thanks.
|
|
|
|
|
Hi,
How can I create a program that it has a status symbol as tray icon and it doesn't became hide when user doesn't activate it at XP OS !?
Thanks
|
|
|
|
|
Make a cuple of icons that looks the same, then change the icon every minute or so, then xp thinks you updated something and that it better show that
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi,
How can I create a program that it has a staus symbol as tray icon and never became hide when user doesn't activate it in XP OS?
thank
|
|
|
|
|
Hello,
I am having a problem using the LoadLibrary function. I am running into heap corruption during the call. The error I am getting is an assert of _CrtCheckMemory() in dbgheap.c.
I created the DLL with the flags MTd and LDd in the command line and I am loading it from an executable created using the Multi-Threaded Debug RTL.
Does anyone know of another way that this function call may cause heap corruption?
Stumped,
John
|
|
|
|
|
Check the global (static) valuables in the DLL. Before the actual assertion there is first chance exception, you can find the exact number from the output window. When you know first chance exception, you can probably intercept it (Ctrl+Alt+E) and see the actual function that does that.
|
|
|
|
|
I'm afraid that I don't quite know what you mean. I should also mention that this does not happen if I invoke the debugger. It only happens when I run without debugging which makes it difficult to determine exactly what is happening.
There are no global static variables directly in my source code and I cannot find any in any of the included headers.
My DLLMain simply returns true.
I know it is happening during the call to LoadLibrary because the assertion occurs before LoadLibrary returns.
Unfortunately, I have very little experience with dlls and so this is all quite new to me.
Thanks,
John
|
|
|
|
|
Check your code. Here is a tutorial on DLL.
http://www.flipcode.com/tutorials/tut_dll01.shtml
Kuphryn
|
|
|
|
|
I triend to go through this tutorial: http://www.codeproject.com/dialog/bmpdlg01.asp. However, it is for MSVC++.net. So therefore it will not work with my version of MSVC++. I was wondering how I would change the bg of a dialog either in MFC or in C++.
If anyone could help me then it would be greatly appreciated.
orcblood
|
|
|
|