User Profile
Collapse
-
hm.. I guess ill try again then! Thank you! would that be sufficient for the program to be considered in pointer notation? -
the program above works but its written in array notation but i have to change it to pointer notation and so i tried writing something like char * t= temp; after line 27 so that later i could refer to the values in temp as *(t +i) and such so that i could change to pointer notation. but when i did that the program doesnt output the new string without the spaces(which is what is supposed to output). it does output the second part correctly, which...Leave a comment:
-
changing from array to pointer format?
Ive tried changing it to pointer format but when i do, the new string without spaces doesnt appear. i appreciate the help!
[/RIGHT][/CENTER][/LEFT]Code:#include <iostream> int stripspaces(char str[]); using namespace std; [LEFT][CENTER][RIGHT][CODE]
int main()
{
char ar[50];
cout << "enter a sentence: " <<endl;
cin.getline(ar, 49);
cout<<" your sentence has "[/]... -
-
need help with a C++ code for class?
Hey guys, im just learning c++ and what i have to do for this specific problem is this: Ask the user to enter a string then count and output the number of x's and 0's (zero and not character O) that occur in the string. This is what i have thus far and im kind of stuck. would anyone please help and let me know what im doing wrong? Thank you so much!
#include<iostre am>
#include<string >
using namespace...
No activity results to display
Show More
Leave a comment: