Click here to Skip to main content
15,889,200 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Help with C program Pin
eitwoman10-Sep-07 1:59
eitwoman10-Sep-07 1:59 
AnswerRe: Help with C program Pin
Mark Salsbery10-Sep-07 6:53
Mark Salsbery10-Sep-07 6:53 
GeneralRe: Help with C program Pin
eitwoman10-Sep-07 10:00
eitwoman10-Sep-07 10:00 
QuestionArray and String Pin
pourang7-Sep-07 21:58
pourang7-Sep-07 21:58 
AnswerRe: Array and String Pin
ubriela7-Sep-07 23:00
ubriela7-Sep-07 23:00 
GeneralRe: Array and String Pin
George L. Jackson8-Sep-07 5:27
George L. Jackson8-Sep-07 5:27 
GeneralRe: Array and String Pin
pourang10-Sep-07 4:20
pourang10-Sep-07 4:20 
AnswerRe: Array and String Pin
George L. Jackson8-Sep-07 5:23
George L. Jackson8-Sep-07 5:23 
Apparently, you are printing the result with the following: std::cout << beta << std::endl. If you print it with std::cout << beta.c_str() << std::endl, you get the desired print out. However, if you actually want to remove the characters following 'a' you can do this:
#include <iostream>
#include <string>
 
int _tmain(int argc, _TCHAR* argv[])
{
	std::string beta = "abcdefg";
	beta.erase(beta.begin() + 1, beta.end());
 
	std::cout << "Result #1: " << beta << std::endl;
	std::cout << "Result #2: " << beta.c_str() << std::endl;
 
	return 0;
}


Also, please post C++ questions in the C++ forum and not the C++/CLI forum.

"We make a living by what we get, we make a life by what we give." --Winston Churchill

GeneralRe: Array and String Pin
pourang9-Sep-07 11:59
pourang9-Sep-07 11:59 
AnswerRe: Array and String Pin
Chetan Patel9-Sep-07 21:23
Chetan Patel9-Sep-07 21:23 
GeneralRe: Array and String Pin
pourang10-Sep-07 4:24
pourang10-Sep-07 4:24 
QuestionPrinting from Print-Preview results in different output Pin
BuckBrown7-Sep-07 10:37
BuckBrown7-Sep-07 10:37 
QuestionHelp with Threading Pin
art_ami7-Sep-07 3:14
art_ami7-Sep-07 3:14 
AnswerRe: Help with Threading Pin
led mike7-Sep-07 4:29
led mike7-Sep-07 4:29 
GeneralRe: Help with Threading Pin
art_ami7-Sep-07 22:52
art_ami7-Sep-07 22:52 
QuestionDesign Forms and Existing Items Pin
BuckBrown6-Sep-07 11:48
BuckBrown6-Sep-07 11:48 
AnswerRe: Opening a new command line instance Pin
Christian Graus5-Sep-07 15:00
protectorChristian Graus5-Sep-07 15:00 
AnswerRe: Opening a new command line instance Pin
Ralf Lohmueller5-Sep-07 15:21
Ralf Lohmueller5-Sep-07 15:21 
AnswerRe: Opening a new command line instance Pin
wly10286-Sep-07 0:17
wly10286-Sep-07 0:17 
QuestionPls can u help me with this error Pin
urbdos4-Sep-07 22:05
urbdos4-Sep-07 22:05 
AnswerRe: Pls can u help me with this error Pin
Hamid_RT5-Sep-07 5:29
Hamid_RT5-Sep-07 5:29 
AnswerRe: Pls can u help me with this error Pin
Christian Graus5-Sep-07 15:00
protectorChristian Graus5-Sep-07 15:00 
QuestionHow to add virtual ip in the windows xp to using c++? Pin
songjacky4-Sep-07 19:27
songjacky4-Sep-07 19:27 
AnswerRe: How to add virtual ip in the windows xp to using c++? Pin
Hamid_RT5-Sep-07 5:29
Hamid_RT5-Sep-07 5:29 
Questiona little help for an someone admittedly new to the program Pin
misterjason4-Sep-07 8:20
misterjason4-Sep-07 8:20 

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.