|
Using .NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yanshof wrote: I try to use some MFC class
Odds are then high that you're not using C++/CLI. Try the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can I code in C or C++ for the Macintosh? I have borland tools. I also have Visual C++ in the Visual Studio, but have never used it. thanks, joeinorange2@aol.com
Joe Sharp
|
|
|
|
|
Why not? Apple claims a Mac does everything better than a PC, and a Mac has everything you will ever need preinstalled. By the way, you are in the wrong forum since this is the "C++/CLI" forum.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
You are in the wrong forum, but the answer is yes, of course. In fact, the Mac I used 6 years ago came with a highly standards compliant C++ compiler.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have developed mulithreade TCP server in for Unix...but wanna do that in C++ usin OOPS concepts... please help... i mean how to do threading n all in OOPs...
extreemer
|
|
|
|
|
Is there any builtin button classes in c++? If yes than please do help me.
|
|
|
|
|
Depends. You're asking in the C++/CLI forum, in which case the answer is yes. If you mean C++, then the answer is that there is NO GUI support in C++, you need to use frameworks ( like Winforms or MFC ) to write code specific to a platform, in order to render a UI.
Sounds like you need to better phrase your question, and perhaps ask it in the Visual c++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
If I have this code made in the Form.h of may project, how can i make the conection in
the main project file(.cpp) for variable "W".....please help.....can you give me a link or something like that where I can learn to do the conections between the variables from interface(form) and my algorithm(code)....
private: System::Void StartPackingbutton_Click(System::Object^ sender, System::EventArgs^ e) {
int W;//Container Width
try {
W=Convert::ToInt32(ContainerWidthtextBox->Text, CultureInfo::CurrentCulture);
}
int main()
{ int W;
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}
lavi
|
|
|
|
|
is there a libary or something where i can get numbers which have like 50 digits without truncation, for a program for find prime numbers etc???
also why i'm here
***************************************************
***************************************************
i'm trying to use the .clear() with vectors but they never work
Code:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int>numbers;
int createindex = 100;
while(createindex)
{
numbers.push_back(createindex);
createindex--;
}
cout << numbers[20] << endl;
numbers.clear();
cout << numbers[20] << endl;
system("PAUSE");
return 0;
}
what am i doing wrong?
thanks i'n advanced
|
|
|
|
|
Yes, such classes exist.
I recommend asking for more information in the right forum ( this is the C++/CLI forum, you want the Visual C++ forum )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can anyone help me with saving a text introduced in a text button in a different file?
|
|
|
|
|
You need to be more clear. Are you in the right forum ( are you using C++/CLI ) ? What do you mean by 'a different file' ? Assuming you're talking about a GUI control, you can ask it what it's Text value is, for C++/CLI the property is .Text.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
HI im currently doing a proj on time capturing.... So i have a push button switch connected to the Rs232 to TTL Converter...the Rs232 in connected to the pc.. So can anybody help to give me the program to capture the time when the push button is pressed....Thanx
|
|
|
|
|
You want this code in C++/CLI, or in C++ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If I want to appeal a windows form, from another form when I push a button, what I should do? I tried this code and I have the following error: Error error C2061: syntax error : identifier 'Results'
private: System::Void ResultsButton_Click(System::Object^ sender, System::EventArgs^ e)
{
Application::Run(gcnew Results());
}
|
|
|
|
|
private: System::Void ResultsButton_Click(System::Object^ sender, System::EventArgs^ e) <br />
{<br />
Results^ resultForm = gcnew Results();<br />
resultForm->ShowDialog();<br />
} <br />
Also, you should include the form header at the top of the form:
#include "Results.h"
|
|
|
|
|
Hello ,
Please can anyone help with this , i have a class defined in my header file SecFishMain.h , i have included the header file in the SecFishMain.cpp file but i keep getting error 2653 and 2065
2653 - "SecFishMain is not a class/namespace"
2063 - "analysisOpt undeclared identifier" ,"userOpt undeclared identifier"
Find code below
SecFishMain.h
#ifndef SECFISHMAIN_H
#define SECFISHMAIN_H
#include <string.h>
using namespace System;
using namespace System::IO;
class SecFishMain
{
public:
SecFishMain(); //Constructor
~SecFishMain(); //Destructor
//Supporting Variables
public:
static int userOpt;
static int analysisOpt;
static unsigned long int textLength;
static unsigned long int keyLength;
};
#endif;
SecFishMain.cpp
// SecFish.cpp : main project file.
#include "StdAfx.h"
#include "SecFishMain.h"
#include "Form1.h"
#include <iostream>
#include <iterator>
#include <bitset>
#include <stdlib.h>
#include <fstream>
//Defining Static variables
int SecFishMain::userOpt;
int SecFishMain::analysisOpt;
unsigned long int SecFishMain::textLength;
unsigned long int SecFishMain::keyLength;
D
|
|
|
|
|
Hi,
I have a key, for that i need to change the permissions for admins to full control, system to full control and power usres to only have read access and all others should not have access.
i have written this code,RegSetRegisterKey API is executing correctly, but if i open the registry using regedit, and open the dialog box for permissions, it is not checking the check boxes for full control and read access.
How to make these check boxes to check for the respective permissions.
SID_IDENTIFIER_AUTHORITY securityid = SECURITY_NT_AUTHORITY;
PSID pAdministratorsSid = NULL;
PSID pSystemSid = NULL;
PSID pPowerusersSid = NULL;
SECURITY_DESCRIPTOR sd;
PACL pDacl = NULL;
DWORD dwAclSize;
HKEY hKey;
LONG lRetCode;
BOOL bSuccess = FALSE;
lRetCode = RegOpenKeyEx(
HKEY_LOCAL_MACHINE,
TEXT("SOFTWARE\\mykey"),
0,
WRITE_DAC,
&hKey
);
if(lRetCode != ERROR_SUCCESS) {
printf("RegOpenKeyEx error! (rc=%lu)\n", lRetCode);
return RTN_ERROR;
}
if(!AllocateAndInitializeSid(
&securityid,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&pAdministratorsSid
)) goto cleanup;
AllocateAndInitializeSid(
&securityid,
1,
SECURITY_LOCAL_SYSTEM_RID,
0, 0, 0, 0, 0, 0, 0,
&pSystemSid
) ;
AllocateAndInitializeSid(
&securityid,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_POWER_USERS,
0, 0, 0, 0, 0, 0,
&pPowerusersSid
);
dwAclSize = sizeof(ACL) +
3 * ( sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD) ) +
GetLengthSid(pSystemSid)
+GetLengthSid(pAdministratorsSid)
+GetLengthSid(pPowerusersSid);
pDacl=(PACL)LocalAlloc(0,dwAclSize);
if(pDacl == NULL) goto cleanup;
if(!InitializeAcl(pDacl, dwAclSize, ACL_REVISION))
goto cleanup;
if(!AddAccessAllowedAce(
pDacl,
ACL_REVISION,
KEY_ALL_ACCESS,
pAdministratorsSid
)) goto cleanup;
AddAccessAllowedAce(
pDacl,
ACL_REVISION,
KEY_READ,
pPowerusersSid
) ;
AddAccessAllowedAce(
pDacl,
ACL_REVISION,
KEY_ALL_ACCESS,
pSystemSid
) ;
if(!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION))
goto cleanup;
if(!SetSecurityDescriptorDacl(&sd, TRUE, pDacl, TRUE)) {
printf("SetSecurityDescriptorDacl error! (rc=%lu)\n",
GetLastError());
goto cleanup;
}
lRetCode = RegSetKeySecurity(
hKey,
(SECURITY_INFORMATION)DACL_SECURITY_INFORMATION,
&sd
);
if(lRetCode != ERROR_SUCCESS) {
printf("fail\n);
goto cleanup;
}
else printf("Success"); //i am getting success
bSuccess = TRUE; // indicate success
cleanup:
RegCloseKey(hKey);
RegCloseKey(HKEY_LOCAL_MACHINE);
if(pDacl != NULL)
HeapFree(GetProcessHeap(), 0, pDacl);
if(pSystemSid != NULL)
FreeSid(pSystemSid);
if(pAdministratorsSid != NULL)
FreeSid(pAdministratorsSid);
if(pPowerusersSid != NULL)
FreeSid(pPowerusersSid);
|
|
|
|
|
This is the C++/CLI forum, this code is C.
Try the visual C++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
the following are the questions...can any body here can help me to get this solution...( it can be either in java or c++ )
1. Define a class Income having the interface Pay salary, Compute Deductions, Calculate Tax. Salary consists of Basic, DA, 15% of basic as HRA. Deductions are for the staff canteen and PF at 8% of Basic. Tax is 20% for annula incomes lass than one laks rupees and 30% above this. A tax surcharge of 10% is additionally charged for the latter income group.
2.Employees have a number, date of birth (dd mm yy), rank, and salary. When an employee is first recruited then all these are given values of 0. Upon confirmation, the actual values of these are entered for the employee. Employees can be given a salary raise of 10% of their previous salary. Their rank can be incremented by 1 and when this happens an employee gets an increment of 25%.
i would very much thankful if you guys can help me....
Skydeegay
|
|
|
|
|
What does "help me to get the solution mean", if not 'do my homework for me' ?
You're not even in the right forum.
I recommend trying to do your own homework, then, when you get stuck, ask some questions in the visual C++ forum, unless you want to do your code in .NET.
And, if you write it in Java, there's no Java forum here.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thnx for ur sucking re...
|
|
|
|
|
You won't get any help here with that attitude.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|