- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
4 Posted Topics
Hello. I am wondering how to split a string lets say char *a="raining apples training away" using a delimiter like "g a" and the result will be: rainin pples trainin way I tried using strstr but I got stuck. Any hints will be greatly appreciated. Thank you in advance! | |
Re: great code for learning, please post all the files, archived. thanks | |
[code=c++] int main() { Ferma *f[20]; int i=0; int e=0; do { cout<<"Alegeti optiunea:\n"; cout<<"1.rata\n" <<"2.gaina\n" <<"3.porc\n" <<"4.vaca\n" <<"0.iesire\n"; cin>>e; switch(e) { case 1: f[i]=new Pasari("rata"); //error at this kind of assignement i++; break; case 2: f[i]=new Pasari("gaina"); i++; break; case 3: f[i]=new Mamifere("porc"); i++; break; case 4: f[i]=new Mamifere("vaca"); … | |
Hello forum. I cant figure out how to overload the '+' operator or maybe theres another error? Im posting from phone so excuse the slopyness. Thanks! [CODE]#include <iostream> #include <string.h> #include <ctype.h> using namespace std; class Ferma { public: static int nr_rate; static int nr_gaini; static int nr_porci; static int … |
The End.