cin problemer
Godaften..jeg sidder med lidt c kode, som ikke helt virker:
#include <stdio.h>
#include <string.h>
#include <fstream>
#include <string>
#include <iostream.h>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[]) {
cout << "Welcome" << endl;
if(strstr(argv[1], "add")) {
//FILE *tmpfile;
ifstream fin;
ofstream fout;
string command;
cout << "Enter the rule you wish to add:" << endl;
cin >> command;
---------------------------------------------
men hvis jeg prøver cout << command; kommer der kun det første ord og det er sq lidt ærgeligt når jeg skal bruge hele sætningen..
nogen der kan hjælpe ? :)