51 Posted Topics
Re: Well as now one answered this ill just add the comment I had in mind when I first saw the post... in c++ structs are just classes with default access right of public, as opposed to private, so any code that can handle structs can handle objects... however if this … | |
Re: no need to redo what has already been done grep -n word file or to use it in that context once you got the string do [code] char *arg[5] ; arg[0] = "grep" ; arg[1] = "-n" ; arg[2] = string.c_str() ; arg[3] = fileName.c_str() ; arg[4] = NULL ; … | |
Re: Hmm, on the top of my head the timeout thingie should be easiest to implement, I think. Atleast if you know soemthing about signaling, check man signal and man alarm (idea: signal( SIGALRM, IgnoreFunc ) ; alarm(timeout) ; recvfrom(...) ; check return code ; alarm(0) ; signal( SIGALRM, OldFunc ) … | |
Re: That is not a question (and what is phase two, only saw phase 1)... Be specific and stop asking peps to solve your homeworks for youself. | |
Re: lol, on my linux distribution man gets says something in the lines of DO NOT USE THIS FUNCTION IT IS NOT SAFE... and no, many of the uses of scanf is unsafe (k, Im not an expert but atleast the string inputs are bad)... cin >> should be good aslong … | |
Re: [QUOTE=Niklas] I know its really hard to read. I had to nest a lot of if statements together and I know there must be an easier way to make it look less cluttered. I'm having a problem where I am trying to tell the program "if varaible num1 is a … | |
Re: Hmm, was not really sure what you were doing with exec, but I suppose you compile score.c to score.out... you never return from exec btw so what you want would probably be (and do check bad returns plz) [code] pid_t pid ; if( (pid = fork()) == 0 ) { … | |
Re: I do wonder if this is still relevant to answer... An overview of the code sugests you have no idea how obejct orientation works in c++ ? For example CardPile() is pointless (it does nothing but initializes a vector and destroys it)... If we assume that you use TheDeck as … | |
Re: IMO "debug my code" is not a question... | |
Re: ... then use g++ for both c and c++ code since it can handle both (of course there is a switch of gcc that makes it behave like g++ but I dont have it in my head)... | |
Re: Again this is not a question this is an project, if we are to do your code please come over and give us the money for it (and provide a formal requrement specification and deadlines)... [ n.b. note the irony here ] | |
Re: [QUOTE=bucsoldier03]how do i get to the tutoriols[/QUOTE] man is your friend... (*hint man malloc) | |
Re: Ehh, wikipedia is rather good for getting rather good explanation of most technical stuff out there (ie [url]http://en.wikipedia.org/wiki/C_plus_plus[/url] ) | |
Re: [QUOTE=sunnypalsingh]Prototypes of functions are missing and change the name of swap function as it is already defined funtion[/QUOTE] Argh the questions in here... Post error reports for crist sake... btw lol, (real reason for posting) 200+ post and still a junior poster, does not sound right ;) | |
Re: [QUOTE=sunnypalsingh]See [URL=http://www.daniweb.com/techtalkforums/announcement8-2.html]This[/URL][/QUOTE] Why do you even give homework help at all ? isnt that what teacher are for ? | |
Re: [QUOTE=systest]I am trying to find out how to stream a file so that if gives me back how many times a certain field label occurred. File example: Cat black 100 home lost Dog brown 632 street lost Dog black 839 home owned Pig pink 123 mud farm Dog white 345 … | |
Re: [QUOTE=sahil_logic][code] #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void palcheck(char str[]); char ans; char str[20]; do { cout<<"Enter the string to check if it is a palindrome. "; gets(str); palcheck(str); cout<<"\nEnter Y to continue. "; cin>>ans; }while (ans=='y'||ans=='Y'); } void palcheck(char str[]) { int l=0,k=0,flag; for(int i=0;str[i]!='\0';i++) l=l+1; k=l; for(int j=0;j<l/2;j++) … | |
Re: Ahh the good old printf("Name: %5s", value)... I am sure I saw a format function somewhere in the stream classes but i have missplaced it!!! | |
Re: Hmm, nwm (tried that with regular code and it worked fine)... | |
Re: [QUOTE=Narue]>The source code should be in Borland C++ Builder 5 or 6. That's gives us the impression that you want [b]us[/b] to write it for you, which isn't going to happen. Show us what you've tried so far instead of just posting your requirements, and we'll help you get it … | |
Re: Background: I somehow got this notifiation via Google Desktop So... I just wanted to say Lol... /pern.*/i |