Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After you accessed the file

Status
Not open for further replies.

joebeach

Programmer
Sep 12, 1999
13
0
0
US
how do you get each second character to be cout?<br>
for example I only want tp print &quot;EEOES&quot; from developer?
 
<br>
<br>
You'll probably want to read the word into an array and then print out every other element. For example...<br>
<br>
for (i=0; i&lt;=(strlen(array)); i++)<br>
{<br>
if ((i%2)==1) { cout&lt;&lt;array<i>; }<br>
}<br>
<br>
I haven't run this exact piece of code, but you get the idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top