Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Windows Registry Pin
*Dreamz14-Nov-05 20:15
*Dreamz14-Nov-05 20:15 
JokeRe: Windows Registry Pin
Owner drawn14-Nov-05 20:25
Owner drawn14-Nov-05 20:25 
QuestionHow to Get the Ports Occupied By a Particular Application?? Pin
Owner drawn14-Nov-05 18:47
Owner drawn14-Nov-05 18:47 
Questionerror LNK2001: unresolved external symbol ___pioinfo Pin
snprani14-Nov-05 18:28
snprani14-Nov-05 18:28 
AnswerRe: error LNK2001: unresolved external symbol ___pioinfo Pin
sunit514-Nov-05 18:42
sunit514-Nov-05 18:42 
GeneralRe: error LNK2001: unresolved external symbol ___pioinfo Pin
snprani14-Nov-05 22:22
snprani14-Nov-05 22:22 
AnswerRe: error LNK2001: unresolved external symbol ___pioinfo Pin
jhwurmbach14-Nov-05 23:25
jhwurmbach14-Nov-05 23:25 
Questionthe rookie needs help again Pin
Binary011014-Nov-05 18:11
Binary011014-Nov-05 18:11 
I'm trying to do this project that reads a four word sentence from one string and then extract each word in the string to four other strings using the spaces between the words as indexes.Then display them in reverse. I cant seem to get this to work and I can't use coditional operators. Any suggestions.Here what I have so far.
#include <iostream><br />
#include <string><br />
<br />
using namespace std;<br />
<br />
int main(void)<br />
{<br />
<br />
	 string sentence;<br />
<br />
	cout << "Enter a four word sentence:";<br />
	getline(cin,sentence);<br />
	cout << "Original string:"<< sentence << endl;<br />
	<br />
	int blank=(" ");<br />
	<br />
	int firstindex = sentence.find(blank);<br />
	<br />
	string first = sentence.substr(0,firstindex);<br />
	<br />
	<br />
	int secondindex = sentence.find(blank,firstindex + 1);<br />
	<br />
	<br />
	string second = sentence.substr(blank + 1,secondindex);<br />
	<br />
	int forthindex = sentence.rfind(blank);<br />
	<br />
	string forth= sentence.substr(sentence.length,blank);<br />
<br />
	int thirdindex= sentence.rfind(blank,forthindex - 1)<br />
	<br />
	string third= sentence.substr(thirdindex,sentence.length - 1);<br />
	<br />
	<br />
	<br />
	cout << "Reversed string:" << forth+" "+third+" "+second+" "+first<< endl;<br />
<br />


BINARY
AnswerRe: the rookie needs help again Pin
*Dreamz14-Nov-05 19:13
*Dreamz14-Nov-05 19:13 
AnswerRe: the rookie needs help again Pin
jhwurmbach14-Nov-05 23:37
jhwurmbach14-Nov-05 23:37 
GeneralRe: the rookie needs help again Pin
Binary011015-Nov-05 1:08
Binary011015-Nov-05 1:08 
GeneralRe: the rookie needs help again Pin
jhwurmbach15-Nov-05 1:13
jhwurmbach15-Nov-05 1:13 
QuestionOpenGL Inventor and Windows Platform SDk Pin
codingfreak14-Nov-05 17:09
codingfreak14-Nov-05 17:09 
AnswerRe: OpenGL Inventor and Windows Platform SDk Pin
__yb15-Nov-05 11:38
__yb15-Nov-05 11:38 
QuestionThead ID Problem ? Pin
kendao14-Nov-05 17:03
kendao14-Nov-05 17:03 
AnswerRe: Thead ID Problem ? Pin
22491714-Nov-05 17:32
22491714-Nov-05 17:32 
QuestionHow to Copy a Part or a Region from one View to another View Pin
axxonet14-Nov-05 16:33
axxonet14-Nov-05 16:33 
AnswerRe: How to Copy a Part or a Region from one View to another View Pin
Aamir Butt15-Nov-05 0:40
Aamir Butt15-Nov-05 0:40 
QuestionHELP! Visual C++ and Windows graphics Pin
Big_Goose14-Nov-05 16:14
Big_Goose14-Nov-05 16:14 
AnswerRe: HELP! Visual C++ and Windows graphics Pin
kk.tvm14-Nov-05 21:53
kk.tvm14-Nov-05 21:53 
QuestionCreating new classes Pin
jpMFC14-Nov-05 15:06
jpMFC14-Nov-05 15:06 
AnswerRe: Creating new classes Pin
Christian Graus14-Nov-05 15:24
protectorChristian Graus14-Nov-05 15:24 
AnswerRe: Creating new classes Pin
Owner drawn14-Nov-05 20:23
Owner drawn14-Nov-05 20:23 
QuestionInterrupting a long running computation job Pin
syscwl14-Nov-05 13:07
syscwl14-Nov-05 13:07 
AnswerRe: Interrupting a long running computation job Pin
David Crow14-Nov-05 16:39
David Crow14-Nov-05 16:39 

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.