|
Can some kind soul tell me how to insert a char imediately after every occurance of another char in a string.
|
|
|
|
|
Andy H wrote: Can some kind soul tell me how to insert a char imediately after every occurance of another char in a string.
Please ask in the Visual C++ forum. This one's for C++/CLI related queries.
|
|
|
|
|
I am experiencing a rather irritating problem in a Managed C++ application I have written. I have a form that is using a custom control that I wrote in C#. The code runs correctly, however whenever the designer generates the C++ code in the ".h" file for the form it prefixes the type of my control with a "::". This causes an exception in the CodeDOM parser when I then try to use the design view of the form.
The custom control is called ImageDisplay, and it is within a namespace of ImageDisplay.
Here is the offending line of code:
this->imageDisplayFront = (gcnew ::ImageDisplay::ImageDisplay());
If I change the line to:
this->imageDisplayFront = (gcnew ImageDisplay::ImageDisplay());
Then all is well in the universe until the next time I make a change in the designer that generates code. Is there a trick I can do to keep whatever is generating this code from adding the extra "::"?
I am running Visual Studio 2005 with service pack 1.
-- modified at 9:03 Tuesday 27th March, 2007
Truly wise men don't play leap frog with Unicorns.
|
|
|
|
|
Hii guys,
i need your help in understanding the concept "Rum time code generation" .
I want to make a program which should insert some code in other running program without any re-compilation and re-link. i know this is possible. But i dont know to implement it as i am beginner to programming.
Thanks
Bhupinder Sodhi
|
|
|
|
|
Some info here[^].
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
i searched google already many times..even i found many projects related to this..but it did nt help me!!
|
|
|
|
|
Bhupinder Sodhi wrote: as i am beginner to programming.
Walk before you run, or you will always crawl.
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 )
|
|
|
|
|
You are right !!
but these sayings cant change my determination to solve my problem!!
please guys help me...i need to know the answer not your thoughts and sayings..
|
|
|
|
|
I think what we're saying is, if you're a beginner, you should learn the language of your choice before jumping into the most advanced topics.
Why C++/CLI ? It's the least supported .NET language, and the most complex one.
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 know its tough but i just wanted to know concepts of it..because its part of my project of degree
|
|
|
|
|
hello friends, i am sathish doing my final year graduation. I want a program in c that to be implemented in Unix. The question is,
Write a server program and two client programs so that the server can communicate privately to each client individually via a single message queue.
please help me. send the program for the above question as soon as possible.
|
|
|
|
|
agsathish wrote: I want a program in c that to be implemented in Unix.
Hi Sathish. You're going to fail, and you deserve to. Not only are you not willing to do your own project, but you've asked for a program in C, on a board dedicated to C++/CLI, that is, C++ under Microsoft .NET.
I recommend you either do your own assignment, and ask questions in the right forum if you get stuck on *specific* things, or you start a pool cleaning business instead of pretending to pursue a graduation that you have no intention of earning.
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 )
|
|
|
|
|
hmm that's f***ed up - Good pool cleaners need to know AND do some stuff.
The food service industry OTOH...
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hey, I was sick of ragging on McDonalds, I thought I'd try something new....
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'm trying to read from the parallel port in XP. I'm using inpout32.dll.
I need to fetch the 8 data bits at the port by using a loop, and display the result in binary. Can someone [I]please [/I]tell me why this doesn't work?
- The idea is to show the input as soon as it changes. I just keep getting 00FF, and no changes even when I [I]know [/I]bits are being sent "into" the port...
[CODE]
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <conio.h>
#include <windows.h>
/* Definitions in the build of inpout32.dll are: */
/* short _stdcall Inp32(short PortAddress); */
/* void _stdcall Out32(short PortAddress, short data); */
/* prototype (function typedef) for DLL function Inp32: */
typedef short _stdcall (*inpfuncPtr)(short portaddr);
typedef void _stdcall (*oupfuncPtr)(short portaddr, short datum);
int main() {
HINSTANCE hLib;
inpfuncPtr inp32;
oupfuncPtr oup32;
int j, i;
short x, x2;
printf("hi\n\n");
/* Load the library */
hLib = LoadLibrary("inpout32.dll");
if (hLib == NULL) {
printf("LoadLibrary Failed.");
while(!kbhit()); //wait for user to press a key
return -1;
}
/* get the address of the function */
inp32 = (inpfuncPtr) GetProcAddress(hLib, "Inp32");
if (inp32 == NULL) {
printf("GetProcAddress for Inp32 Failed.");
while(!kbhit()); //wait for user to press a key
return -1;
}
oup32 = (oupfuncPtr) GetProcAddress(hLib, "Out32");
if (oup32 == NULL) {
printf("GetProcAddress for Oup32 Failed.\n");
while(!kbhit()); //wait for user to press a key
return -1;
}
x = inp32(0x378);
x2 = x;
while (x == x2) {
x = inp32(0x378);
}
printf("port read %04X => %d\n", x, (x & 0x01)/0x01);
while(!kbhit()); //wait for user to press a key
FreeLibrary(hLib);
return 0;
}
[/CODE]
|
|
|
|
|
This code is C. this forum is for C++/CLI.
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,
I have one MFC application some times it gives me error message "A Required resource was" and I have to close application
from taskbar.
Can ayn one tell me what is that and how to ovecome it.
Thanks,
Rushiraj
|
|
|
|
|
In order to use the proper resource, the first thing you need to do is to post your question in the Visual C++/MFC forum. This is the C++/CLI (Managed C++) forum.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi everyone,
I would like to know how to concat multiple images into a single one?
I have a form that contains multiple images(in different pictureBoxes), after pressing a button, a new form is displayed containing one image (in one pictureBox)that is the result of concatenating the previous images.
The images are of the same height and width. I need to do that with minimum possible time,
thanks,
|
|
|
|
|
Create a new Bitmap, then use Graphics::FromBitmap ( or is it FromImage ? ). Then you can draw your other Bitmaps on to the new one, in whatever order you like.
If you asked this in the wrong forum, and you're not using .NET, and you're also not using GDI+, then you can do the same with HBITMAPs and a HDC, but the code will be a little more involved.
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 the type of threading im using is..
#include <windows.h>
#include <process.h>
using namespace std;
int shutdown=0;
int main(){
unsigned sid;
(HANDLE)_beginthreadex( NULL, 0, sendrecv, NULL, 0, &sid);
while(1){
Sleep(1000);
if(shutdown==1){ break; }
}
}
unsigned __stdcall threadprocess(void *params){
return 0;
}
//What i need to do is pass a string from the main() to the threadprocess.. Please Help.
|
|
|
|
|
|
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Good reply!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|