Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for daianahoney

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!

Member Avatar for daianahoney
0
3K
Member Avatar for maikens

Hi, I am having a problem with an assignment for a C++ course. I have to make a Game of Life simulator (predator and prey). There are two organisms, lion and ant, and the lions eat the ants. My problem is that for some reason I can't fathom, the lions …

Member Avatar for daianahoney
0
313
Member Avatar for daianahoney

[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"); …

Member Avatar for daianahoney
0
201
Member Avatar for daianahoney

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 …

Member Avatar for daianahoney
0
234