Click here to Skip to main content
15,887,923 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Spying on socket Ports Pin
kbsoftware14-Jan-04 12:00
kbsoftware14-Jan-04 12:00 
GeneralVERY URGENT...HELP ME! Pin
swarnamanoo14-Jan-04 1:25
swarnamanoo14-Jan-04 1:25 
GeneralTerminal Server Enumerate processes only belongin to the current user session Pin
Braulio Dez14-Jan-04 1:00
Braulio Dez14-Jan-04 1:00 
GeneralRe: Terminal Server Enumerate processes only belongin to the current user session Pin
22491714-Jan-04 1:21
22491714-Jan-04 1:21 
GeneralRe: C++ Pin
Joaquín M López Muñoz14-Jan-04 2:38
Joaquín M López Muñoz14-Jan-04 2:38 
GeneralRe: C++ Pin
NewbieCoder14-Jan-04 2:43
NewbieCoder14-Jan-04 2:43 
GeneralRe: C++ Pin
Joaquín M López Muñoz14-Jan-04 3:03
Joaquín M López Muñoz14-Jan-04 3:03 
GeneralRe: C++ Pin
Member 81460314-Jan-04 3:32
Member 81460314-Jan-04 3:32 
The 'count()' function is correct. Your call

int keer=count(str,s);

is looking for the character stored on s.

I think you want

int keer=count(str,'s');

This will count the 's' characters in the string str. You can get rid of the in s variable unless you want to be able to change it in the future. If this is the case assign the character 's' to the variable s and leave the call alone

int s='s';

In the 'swap()' function you are copying the addresss of the string NOT the string. The local container should be an array large enough for the string and the strings should be copied NOT assigned. Check the standard 'C' function 'strcpy()'. Your call will need to pass the string sizes. If you are not using the string size parameters to 'swap()' you should dispense with them. The declaration and definition header would look like: void swap(char str[], char str2[]);. You have already made certain that they will fit in the allotted storage (60 characters or less). The code in the 'swap()' function should look something like:

char temp[61];
strcpy(temp, str);
strcpy(str, str2);
strcpy(str2, temp);
GeneralRe: C++ Pin
David Crow14-Jan-04 3:33
David Crow14-Jan-04 3:33 
GeneralRe: C++ Pin
NewbieCoder14-Jan-04 5:01
NewbieCoder14-Jan-04 5:01 
GeneralGDI question Pin
Anthony_Yio13-Jan-04 23:45
Anthony_Yio13-Jan-04 23:45 
GeneralRe: GDI question Pin
ohadp14-Jan-04 1:43
ohadp14-Jan-04 1:43 
GeneralMFC Pin
parthmankad13-Jan-04 22:57
parthmankad13-Jan-04 22:57 
GeneralRe: MFC Pin
Eugene Pustovoyt13-Jan-04 23:03
Eugene Pustovoyt13-Jan-04 23:03 
GeneralRe: MFC Pin
Prakash Nadar13-Jan-04 23:05
Prakash Nadar13-Jan-04 23:05 
GeneralGets a internet page through HTTP proxy Pin
Eugene Pustovoyt13-Jan-04 22:40
Eugene Pustovoyt13-Jan-04 22:40 
GeneralRe: Gets a internet page through HTTP proxy Pin
YaronNir19-Jan-10 4:09
YaronNir19-Jan-10 4:09 
GeneralCrash at 2nd SendMessage Pin
SiddharthAtw13-Jan-04 22:27
SiddharthAtw13-Jan-04 22:27 
GeneralRe: Crash at 2nd SendMessage Pin
Prakash Nadar13-Jan-04 22:58
Prakash Nadar13-Jan-04 22:58 
GeneralRe: Crash at 2nd SendMessage Pin
ohadp13-Jan-04 23:00
ohadp13-Jan-04 23:00 
GeneralRe: Crash at 2nd SendMessage Pin
Monty213-Jan-04 23:27
Monty213-Jan-04 23:27 
GeneralWant to make buttons that can't get focus Pin
ohadp13-Jan-04 21:51
ohadp13-Jan-04 21:51 
GeneralRe: Want to make buttons that can't get focus Pin
Rob Manderson13-Jan-04 22:47
protectorRob Manderson13-Jan-04 22:47 
GeneralRe: Want to make buttons that can't get focus Pin
ohadp13-Jan-04 22:54
ohadp13-Jan-04 22:54 
GeneralRe: Want to make buttons that can't get focus Pin
Rob Manderson13-Jan-04 23:00
protectorRob Manderson13-Jan-04 23:00 

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.