|
Are you using C++/CLI, or vanilla C++ in VS2005 ? You also seem to be asking people to do an assignment for you, why can't you find this info for yourself ?
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 )
|
|
|
|
|
what...?
I never asked any one to do my assignment....???? It could be a part of assignment but not the whole assignment...??????? But it is not any assignment...i am just startin teaching myself IP...so its a step1. Yeh but to get started i read this question somewhere...
I did find this info myself aswell...d only reason i put this up was bcos i was not sure of the different methods ...later i found out that bilinear interpolation is one of d complex method...so to make sure i ws right i put up a question here......And its always better to take some pre info before you start working over any new area and thats wt i did.. I am starting up with Image processing , speech processing and stuff...And i guess its right to ask some one experienced like urself....who could push me to the right direction....I mostly work over C#.net and recently only i started with MFC n all...
Anyway from next time i would mention what all info my google friend gave me and in what area i am confused...
Thanks for replying to my post...Problem solved.....
SS
|
|
|
|
|
does anyone know how to copy data from one listbox(several columns) to another one?
Thanks In Advance;
|
|
|
|
|
If this is .NET, then the listboxes have an Items property. If it's not .NET, you'r in the wrong 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 )
|
|
|
|
|
Hello every body ..
If you can I need a cod to search in a text file ....
I need it to search of word which contin of 3 word ..
can you help me I try but I cant write it ...
plase help me as soon as you can ...
non light
|
|
|
|
|
This is the C++/CLI forum. Try the Visual C++ forum, but first try doing a little research. You should ask a question which explains what you've tried. The fstream class is the best way to read a file, and you can read a file word by word with it.
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 )
|
|
|
|
|
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
class Complex{
public:
Complex();
Complex(double);
Complex(double,double);
void write() const ;
bool operator==(const Complex& ) const ;
bool operator!=(const Complex& ) const ;
Complex operator-();
friend ostream& operator<<(ostream& out,Complex& c);
private:
double real;
double imag;
};
Complex::Complex(){
real=imag=0.0;
}
Complex::Complex(double re){
real=re;
imag=0.0;
}
Complex::Complex(double re,double im){
real=re;
imag=im;
}
void Complex::write() const {
cout<<real<<"+"<<imag<<'i'<<endl;
}
bool Complex::operator==(const Complex& u ) const {
if(real==u.real&&imag==u.imag)
return true;
else return false;
}
bool Complex::operator!=(const Complex& u ) const {
if(real!=u.real||imag!=u.imag)
return true;
else return false;
}
Complex Complex::operator-(){
real=-real;
imag=-imag;
}
ostream& operator<<(ostream& out,const Complex& c)
{
return out<<c.real<<"+"<<c.imag<<'i'<<endl;
}
int main(){
Complex c1(2.3,5.6);
Complex c2(1.4,2.5);
if(c1==c2) {
c1.write();
c2.write();
cout<<c1<<endl;
cout<<c2<<endl;
}
return 0;
}
I have declared :friend ostream& operator<<(ostream& out,Complex& c);
but why the error says:
cannot access private member declared in class 'Complex'?
|
|
|
|
|
This is a well asked question, but this is the C++/CLI forum, 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 )
|
|
|
|
|
Isn't it C++ forum?
|
|
|
|
|
"The C++ / CLI is for managed and mixed-mode C++ programming only " says the sticky post at the top of the forum. If you read that post, you'll see that it's for exactly what the name says - managed C++ and C++/CLI. This is C++ that uses the .NET framework. The visual C++ forum is for straight C++ questions.
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,
in C# it's possible to get a handle to a process by doing:
Process[] p = Process.GetProcesses();
and checking each process in 'p' to find a specific one by its using 'ProcessName' property.
Does someone now how to that in C++ to search for a specific process ?
Thanks a lot !
Pat.
p.f. Goudjo-Ako
Bringing our energy together !
|
|
|
|
|
In managed C++ you do it the same - it's the same .NET Process class.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Assuming that you mean in standard C++, you're in the wrong 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 )
|
|
|
|
|
One of my co-workers has had an interesting problem with an application that does lots of text processing. The text processing takes a long time to complete once kicked off (it runs on several gigs of data).
When doing a basic UI for it he set a button on a form that would start this long process (didn't use a background worker, its running in the UI's thread). At this point when watching the processes memory usage it was increasing very fast (around 3 MB's per second).
Then an interesting observation was made ... if a message box was shown after the initial processing had started, the memory usage would go down to a normal level and then for the rest of the processing it would hold solid.
The only way that makes sense to me is if the garbage collector wasn't actually freeing the memory for some reason, until the message box appeared. My guess is that this has something to do with the fact that the processing was being hosted in the UI's thread and not in a worker thread.
We created a console application to do the same processing and it has a stable amount of memory use for the entire time it takes to run.
Has anybody here seen anything else like this where UI threads cause garbage collection not to clean things up ... or at least have an idea of what the main cause of this problem is?
Truly wise men don't play leap frog with Unicorns.
|
|
|
|
|
after creating the new dialog (IDD_GET_PROFILE) and build the project i am getting the error
as
ID of the new dialog is not defined.
and if i click on the error it is pointing the
enum { IDD = IDD_GET_PROFILE };
in the .h file of the project.
the id is defined automatically in the resource.h file
where else we need to define the ID?
how to solve the problem?
Help Ever Hurt Never
|
|
|
|
|
This question should be on the C++/MFC board, not the managed C++ board.
The compiler needs to know what the value of IDD_GET_PROFILE is at the point of the enum
declaration. The resource editor usually puts these in resource.h so make sure you've included
that file somewhere before you try to use IDD_GET_PROFILE.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
My code caused an _CrtIsValidHeapPointer Assertion failure. Microsoft has a solution( Initialization of native global objects requires CRT (C RunTime) startup routine).
This Solution requires
1. Set Linker\Advanced\Entry Point to "" (empty string)
2. Set Linker\System\Subsystem to Not Set
It allows the application and Form to run but an annoying console window appears.
I need help removing this console window or a better way than Microsoft's solution.
Please Help. Thanks.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
earlgraham wrote: 2. Set Linker\System\Subsystem to Not Set
It seems to me that should be set to /SUBSYTEM:WINDOWS. Don't know if that'll work though
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
If you set it to Windows the CRC is not loaded. I tryed.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Did setting it to WINDOWS automatically change the Linker\Advanced\Entry Point setting?
For a forms app, the Linker\Advanced\Entry Point setting is "main" and the Linker/System/Subsystem is WINDOWS.
For a Win32 app, Linker\Advanced\Entry Point is WinMainCRTStartup (or wWinMainCRTStartup for
unicode) and the Linker/System/Subsystem is WINDOWS.
So, it seems to me, you need Linker\Advanced\Entry Point set to WinMainCRTStartup (or
WinMainCRTStartup), the Linker/System/Subsystem set to WINDOWS, and change your "main" to
"_tWinMain" (or whatever the appropriate WinMain prototype is these days ) ...
WinMainCRTStartup will call a "WinMain", not "main".
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Changing the entry point to WinMain did not work but Changing it to the following removed the console window.
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
Thanks for the tips.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Cool!
earlgraham wrote: Changing the entry point to WinMain did not work
I said change to WinMainCRTStartup, not WinMain.
That's probably what entry point is being used if your _tWinMain() is getting called.
Cheers
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hai,
In my project there are 3 groups and each has 4 radio boxes.
if i check one radio box of a group than check in the other group is
remooved ? is there any problem in the property setting.
please guide me.
Help Ever Hurt Never
|
|
|
|
|
Are you still having trouble with this?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi all,
I have a component dll compiled as /clr (mixed), I cannot put a break point in any module,
could anyone suspect how to debug it?
Notice that:
The startup project is written in C# and it enables debugging for unmanaged code.
In the build configuration for the sicky dll:
Debugging/Attach property is set to true.
Linker/Debugging/Generate Debug Info property is set to true.
Linker/Debugging/Generate program databse file --> (the same name of the dll).pdb
The optimisation options are set to default.
Regards,
HZ
|
|
|
|