|
hi,
if u know c++ and C# ( i mean CLR ,CTS ).It's Very easy to learn MC++.so u don't have to spend much time on it.u just go on coding in c++ and use classes which u used in c#.
There's lots articles submitted here.so go through it.
to start with select vc.net and then project type managed c++ application.so u are ready to code in c++.
i prefer wrox series for MC++.
by
baijumax;P
|
|
|
|
|
Hello,
I'm having trouble trying to use an access declaration. i.e I'm trying to manually change the access level of an inherited member (previously public) to protected. How do I do this in MC++?
void
|
|
|
|
|
During a design of my project there is no errors appear and then an unkown error apprear without any logical reasons or code error.
the following link has the picture of the message appear.
http://www.arabmoheet.com/Error.JPG[^]
thanks.
Waleed Eissa
|
|
|
|
|
hi...
can anyone help me wiritng c++ program that should compile and run on unix
the program does the following
1. Forks 3 child processes in parallel
2. child 1 prints : Hi, nice to see you!
child 2 prints : the weather is nice today!
child 3 prints : have fun !
3. waits on each child to finish
4. prints "see you later
thanks
aravind
|
|
|
|
|
Alright i have to write this code that is supposed to calculate the gardes of 10 students and output the highest average abd the student Identification number of the person with the highest average.I am stuck and so is my whole class so please help this is what i ahve so far.Please someone save my life
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#using <mscorlib.dll>
#include <tchar.h>
using namespace System;
char grade(int id, int t1, int t2);//function prototype
// This is the entry point for this application
int _tmain(void)
{
//declaration
char grade;
int t1,t2,tot,avg,max,high_avg_id,id,i;
max=0;
//Processing phase
for (i=1;i<=10;i++)
{
Console::WriteLine(S"Please enter your Student Id: ");
id = Int32::Parse(Console::Readline());
Console::WriteLine(S"Please enter Test one score: ");
t1 = Int32::Parse(Console::ReadLine());
Console::WriteLine(S"Please enter Test two score: ");
t2 = Int32::Parse(Console::ReadLine());
tot = t1 + t2;
avg = tot/2;
if (max < avg)
{
max = avg;
high_avg_id = id;
}
if (avg >= 90)
grade = 'A';
else
if (avg >= 80)
grade = 'B';
else
if (avg >= 70)
grade = 'C';
else
if (avg >= 60)
grade = 'D';
else
grade = 'F';
}
return 0
}
char grade
|
|
|
|
|
// Written By Baiju Max
//EMail:- Baijumax@gmail.com,baijumax@yahoo.com
hi man,
enjoy coding .see below solution for u r problem.
#include "stdafx.h"
#using <mscorlib.dll>
#include <tchar.h>
using namespace System;
int _tmain(void)
{
int nMark1(0),nMark2(0),nStudentID(0),nCurrentStudentID(0);
float flAvg(0),flMaxAvg(0);
String* strGrade = new String("No Grade");
//Read The Input From The User
for ( int iIndex = 0 ; iIndex < 2 ; iIndex ++ )
{
Console::Write(S"Pl's Enter The Student ID:");
nCurrentStudentID = Int32::Parse(Console::ReadLine());
Console::Write(S"Enter The Test One Score:") ;
nMark1 = Int32::Parse(Console::ReadLine());
Console::Write(S"Enter The Test One Score:") ;
nMark2 = Int32::Parse(Console::ReadLine());
//Now Caculate Avg
flAvg = (float) (nMark1 + nMark2 )/ 2 ;
if( flMaxAvg < flAvg )
{
flMaxAvg = flAvg;
nStudentID = nCurrentStudentID;
// Now Calculate The Grade
if ( flMaxAvg >= 50 && flMaxAvg < 60 ) //D- Grade 50-59
{ strGrade = "D" ;}
else if ( flMaxAvg >= 60 && flMaxAvg < 70 ) // C- Grade 60-69
{ strGrade = "C" ;}
else if ( flMaxAvg >= 70 && flMaxAvg < 80 ) // B- Grade 70-79
{ strGrade = "B" ;}
else if ( flMaxAvg >= 80 && flMaxAvg < 90 ) // A- Grade 80-89
{ strGrade = "A" ;}
else if ( flMaxAvg >= 90 && flMaxAvg <= 100 ) // S- Grade 90-100
{ strGrade = "A" ;}
else { strGrade = "F" ; }
}
}
Console::Write(S"Student ID Is:" );
Console::Write(nStudentID.ToString());
Console::Write(S"Highest Avg is:");
Console::Write( flMaxAvg.ToString());
Console::Write(S" Grade:");
Console::Write(strGrade);
Console::ReadLine();
return 0;
}
by
baijumax
|
|
|
|
|
your code gave me an error:LNK2019 unresolved external symbol_main refferenced in function_main CRT startup
fatal error LNK1120: 1 unresolved external
|
|
|
|
|
Hi,
I believe problem with your project file. do one thing
start vc.net then select managed c++ Application.
it will create main method;
cut and paste the code inside sample codes main.
by
baijumax;P
|
|
|
|
|
Hey thanks but i was able to resolve the issue.It was a very simple one at that and was totally my mistake.I for got to #include tchar.h
|
|
|
|
|
Don't do peoples homework for them, it doesn't help them in the long run. Also, u and r are letters, they are not words.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
hi,
Sorry About That.I accept your comment.
by
baijumax
|
|
|
|
|
the following text is:
Note that code is instantiated only for member functions that are called. For class templates, member functions are instantiated only when they are used. This, of course, saves time and space. It has the additional benefit that you can instantiate a class even for those types that cannot perform all the operations of all the member functions, as long as these member functions are not called. As an example, consider a class in which some member functions use the operator < to sort elements. If you refrain from calling these member functions, you can instantiate the class template for types for which operator < is not defined.
what it means?please tell me,thx.
|
|
|
|
|
What bit don't you understand ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I'm using C++ and new to winsock. i'm trying to create a program that sends emails with attachments. FIRST, with WINSOCK, how do i SEND EMAILS and ATTACHMENTS over a server that allowes annoymous emails (eg hotmailmailserver), what information needs to be sent and received, ANY HELP would be nice thanX
yee
|
|
|
|
|
Hi there,
I've created a cli app that allows a user to control windows services. Just a quick question - while trying to "break" the app i noticed that if i performed a pause command on a service that couldnt be paused - the app would just hang. I guess my question is, Is there a way to query the service to find out what control commands it can accept? Any sample code on this would be greatly apprecaited.
Thanks
|
|
|
|
|
i am trying to open this file it won't open, my file name is outdate and i have name and lastname in it. it can't open it that i be able to read throw it.
# include <fstream>
# include <iostream>
# include <fstream>
main()
{
char age;
char name;
const char outfile[20] = "outdata.txt";
ifstream in;
in.open("outdata.txt");
if (!in)
cout << " error in opening: " << endl;
else
cin.get(name);
}
|
|
|
|
|
Is the file in the same folder as your exe ? Also, I can't see your #includes, but the lack of any reference to namespaces makes me thing you've included iostream.h. Don't, this is not valid C++. Use iostream instead ( no .h ). This means you'll need to scope namespace std.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi,
My purpose is:
- Write a service
- This service must create thread on every process (on every WindowStation)
Problem is:
CreateRemoteThread in MSDN wrote:
Terminal Services isolates each terminal session by design. Therefore,
CreateRemoteThread fails if the target process is in a different session
than the calling process.
If have many users is loging then have many session. I want to
CreateRemoteThread of every session.
My solution is:
- The first, find window station of the process which I must create thread
on it (use WTSEnumerateProcesses)
- The second, use SetProcessWindowStation to assign a window station to the
calling process (is my service). Result my service will operation on the
window station which I must create thread on a process on it.
- Then, use CreateRemoteThread to create thread. Now, CreateRemoteThread is
successful.
Is this solution true ?
Thank in advance.
PTM.
n4_t1
|
|
|
|
|
if somebody could give me this pseudocode"algorith that accepts a positive integer nad then reverses and prints the order of its digits e.g. if input is 9038, the output is 8309"
|
|
|
|
|
I am writing a managed wrapper for an unmanaged class. The unmanaged class is stored in a dll. At the top the of the .cpp file for the managed wrapper i have #using<unmanagedclass.dll> I've also added a reference to this dll using the Add References... option. However, when I compile, the compiler does not recognze my unmanaged class.
Thanks
|
|
|
|
|
hi,
try this one before calling u r unmanaged methods
#pragma UNMANAGED
by
baijumax;P
|
|
|
|
|
|
Hey all,
We have a C++ GUI application built with Trolltech's QT and building with Visual Studio as a Win32 application. If I were to want our application to make the switch to managed code would I be able to do this with the third party (QT) libraries? That is it possible to take existing .libs and 'manage' them in my code? Are there any other caveats?
Thanks,
Daniel
|
|
|
|
|
Can someone out there give suggestions and solutions(console) to a part of my project .. i am pretty new to graphs and C++ .. here is the problem
=--------------------------------------------------------------=
I wanted to implement a graph class with the following functions
addNode - adds a node
addEdge - to connect 2 nodes
countNodes - to return the countof nodes
countEdges - to return count of edges
countPaths(i,j,k) - returns count of number of paths of length k from nodes i to j
displayEdges - display list of edges
can you include the time complexity of each function, and will be glad if you write extra functions to work with my graph exercise
thanking you in advance!!
Bula mai Fiji!
|
|
|
|
|
I have to read a file that has 2 integers in each line. I'm using Visual c++ .net and I read the file like this:
String *l = s->ReadLine();
How can I split the String to have 2 different Strings, each one with one integer?? I know there is a function for String that is called Split but I don´t know how to use it.
Thanks for your help
|
|
|
|