Try: #include <stdio.h> remove(const char *filename);
Verolix
Posts
-
delete files from c++ code -
Need uuid.lib for Visual Studio 6 (debug)Try this one: http://verolix.filecloud.com/files/file.php?user_file_id=11371[^]. :)
-
amstream.hCan someone upload amstream.h somewhere? Visual Studio 2005 doesn't have it...
-
Small executablesI've seen a few programs out there that are very small in size and actually do something (ex.: .kkreiger)... When I look at their import functions list I see only LoadLibrary and GetProcAddress. The question is: How do you remove all those additional dependencies from your programs (C++)?
-
ParserThanks everyone. :) And I modified the message a little...
-
DirectX Init problemDid you include d3d9.lib? If that doesn't help, include d3dx9.lib.
-
ExponentsHow do I do exponents in C++? If ^ is XOR...
-
ParserI wrote this string parser. It compiles without errors. But when I launch the program, it doesn't seem to quit the loop.... What's wrong?
#include int Parse(char *String)
{
int Temp = 0;
int Result = 0;
int Length = int(strlen(String)); // The length of the string.
bool Negative = false;
// Main cycle. Loop through all the symbols of the string.
for (int i = 0; i < Length; i++)
{
if (i = 0)
{
// If the first symbol of the string is "-". Make it negative.
if (String[i] == 45)
{
Negative = true;
}
}
else
{
// Make sure the input symbol is a number. Return 0 if it's not.
if (String[i] < 48)
{
return 0;
}
else if (String[i] > 57)
{
return 0;
}
else
{
// For aech number, perform specific operations.
switch (String[i])
{
// If it's 0.
case 48:
Temp = 1;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 1.
case 49:
Temp = 1;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 2.
case 50:
Temp = 2;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 3.
case 51:
Temp = 3;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 4.
case 52:
Temp = 4;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 5.
case 53:
Temp = 5;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 6.
case 54:
Temp = 6;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 7.
case 55:
Temp = 7;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 8.
case 56:
Temp = 8;
for (int j = 0; j < (Length - i); j++)
{
Temp *= 10;
}
Result += Temp;
Temp = 0;
break;
// If it's 9.
case 57:
Temp = 9;
for (int j = 0; -
The 'X' click eventReplace SaveData() in mnuExit_Click and all other locations (except frm1_closing) by Me.Close().
-
The 'X' click eventPrivate Sub _whatever_you_want_(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
-
Toolbar button images not being diplayedI can't see the images on the toolbar buttons.
-
"cout" and "cin" won't workThanks. :)
-
"cout" and "cin" won't workBy using the
std
namespace you make the program managed (at least I think so). I need a pure C++ program, without any .NET elements. -
"cout" and "cin" won't workI use Microsoft Visual Studio .NET 2003 and creating an unmanaged program. I included iostream but its functions (like
cout
andcin
) still won't work. Help me! P.S.: I want an UNMANAGED (not-.NET) program. -
Creating an MDI childThanks.
-
Calling base class functions from a derived oneOk. Thanks. I got that MDI child creation. Now I have an integer variable named
OpenWindows
that i declared asPublic
in myfrmMain
class. What I need now is how do I changeOpenWindows
' value fromfrmMain
's child -frmText
when it's closing? The code below doesn't work:Private Sub frmText_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing Dim blabla As New frmMain blabla.OpenWindows -= 1 End Sub
-
Creating an MDI childI have a form named frmMain, it's an MDI container (MDI parent). How do i create an MDI child for that form. Child's name should be frmText. Zero
-
UploadHow can I upload my VB.NET program here?