Sorry back ,problem was not solved. I tried using the getline() but it didn't work.
Code:
#include<iostream>
#include<cstring>
using namespace std;
int main ()
{
char decode_message;
int length;
//will be like 48657865.435435643.42143256467.243125435.2143214.5683465.4732985793.43278567.13527186.54396984
cin>>decode_message;
length=strlen(decode_message);
getline(decode_message,length,".")
for(;;)
return 0;
}
This just slipts the string into bits, but what I would like is for the first "section" (before the dot) to be assigned to a variable called "numbers" and then the second "section" as well. I was thinking of using some for() loops, but I'm stuck.
I can get the first number and the second ect but then I can combine them to form one full variable. Just saying numbers=decode_message[0] + decode_message[1] dosn't work.
Ahy help?