Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to setup a button on Visual C++ to execute a pgm Pin
Learning28-Apr-02 10:12
Learning28-Apr-02 10:12 
AnswerRe: How to setup a button on Visual C++ to execute a pgm Pin
Christian Graus28-Apr-02 10:29
protectorChristian Graus28-Apr-02 10:29 
AnswerRe: How to setup a button on Visual C++ to execute a pgm Pin
Nish Nishant28-Apr-02 14:11
sitebuilderNish Nishant28-Apr-02 14:11 
AnswerRe: How to setup a button on Visual C++ to execute a pgm Pin
Maxwell Chen28-Apr-02 19:05
Maxwell Chen28-Apr-02 19:05 
AnswerRe: How to setup a button on Visual C++ to execute a pgm Pin
Gaurika Wijeratne28-Apr-02 19:52
Gaurika Wijeratne28-Apr-02 19:52 
GeneralCFrameWnd - Changing layout Pin
Patrik Mueller28-Apr-02 9:14
Patrik Mueller28-Apr-02 9:14 
GeneralRe: CFrameWnd - Changing layout Pin
Patrik Mueller29-Apr-02 1:25
Patrik Mueller29-Apr-02 1:25 
GeneralAPI: replacing chars Pin
User 665828-Apr-02 8:43
User 665828-Apr-02 8:43 
Hi
I've been working the whole day on this problem, but I can't find a solution. Cry | :((
Say I have char as follows:
const char * buf

This char may contain MORE than one \0 character. It may therefore look like "this\0isthewhole\0char"

What I want to do now is to replace all \0 with a "+" or something else.
How can I do it? So far I have this, which doesn't work:
while(*buf++)
{
	if(*buf == '\0') 
		*packet = '+';
	else
		*packet = *buf;

	*packet++;
}



regards

modified 12-Sep-18 21:01pm.

GeneralRe: API: replacing chars Pin
Tom Archer28-Apr-02 9:10
Tom Archer28-Apr-02 9:10 
GeneralRe: API: replacing chars Pin
User 665828-Apr-02 9:16
User 665828-Apr-02 9:16 
GeneralRe: API: replacing chars Pin
Tom Archer28-Apr-02 9:24
Tom Archer28-Apr-02 9:24 
GeneralRe: API: replacing chars Pin
Joaquín M López Muñoz28-Apr-02 9:16
Joaquín M López Muñoz28-Apr-02 9:16 
GeneralRe: API: replacing chars Pin
User 665828-Apr-02 9:28
User 665828-Apr-02 9:28 
GeneralRe: API: replacing chars Pin
Joaquín M López Muñoz28-Apr-02 11:33
Joaquín M López Muñoz28-Apr-02 11:33 
GeneralRe: API: replacing chars Pin
Nish Nishant28-Apr-02 14:13
sitebuilderNish Nishant28-Apr-02 14:13 
GeneralRe: API: replacing chars Pin
Mike Nordell1-May-02 10:19
Mike Nordell1-May-02 10:19 
GeneralCListView & Appending Items :: MFC Pin
valikac28-Apr-02 7:41
valikac28-Apr-02 7:41 
GeneralRe: CListView & Appending Items :: MFC Pin
l a u r e n28-Apr-02 12:30
l a u r e n28-Apr-02 12:30 
GeneralRe: CListView & Appending Items :: MFC Pin
Shog928-Apr-02 12:41
sitebuilderShog928-Apr-02 12:41 
GeneralRe: CListView & Appending Items :: MFC Pin
Ravi Bhavnani28-Apr-02 13:01
professionalRavi Bhavnani28-Apr-02 13:01 
GeneralRe: CListView & Appending Items :: MFC Pin
valikac28-Apr-02 13:13
valikac28-Apr-02 13:13 
GeneralRe: Solution Pin
valikac28-Apr-02 13:14
valikac28-Apr-02 13:14 
QuestionNew class in dialog program? Pin
28-Apr-02 7:40
suss28-Apr-02 7:40 
AnswerRe: New class in dialog program? Pin
Andres Manggini28-Apr-02 7:59
Andres Manggini28-Apr-02 7:59 
GeneralWin API - Help with sizing windows Pin
ParaSwarm28-Apr-02 7:02
ParaSwarm28-Apr-02 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.