Convert String to C++

Hi I would like to know how I can convert a string which represents a date to an integer.

1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;
#include <string>

int main(){
  string actual_date("18/10/2000");
  int date = ????????


Thank you
Well you need to define what that actually means. Does it just mean 18102000 (removed the slashes)? Does it mean number of seconds since some set date?
What do you want an integer representation to actually represent?
first convert, day_string = "10"; then day_int =10;
same as month and year.
Topic archived. No new replies allowed.