51 Posted Topics

Member Avatar for TimC

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 …

Member Avatar for SpS
0
163
Member Avatar for slobo7x

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 ; …

Member Avatar for perniciosus
0
461
Member Avatar for Cudmore

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 ) …

Member Avatar for perniciosus
0
215
Member Avatar for some one

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.

Member Avatar for some one
0
401
Member Avatar for sahil_logic

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 …

Member Avatar for perniciosus
0
403
Member Avatar for Niklas

[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 …

Member Avatar for Niklas
0
172
Member Avatar for peter_budo

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 ) { …

Member Avatar for peter_budo
0
184
Member Avatar for kharri5

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 …

Member Avatar for perniciosus
0
245
Member Avatar for sahil_logic
Member Avatar for Asif_NSU

... 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)...

Member Avatar for perniciosus
0
186
Member Avatar for smartintelleng

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 ]

Member Avatar for perniciosus
0
115
Member Avatar for bucsoldier03

[QUOTE=bucsoldier03]how do i get to the tutoriols[/QUOTE] man is your friend... (*hint man malloc)

Member Avatar for dwks
0
226
Member Avatar for guideseeq

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] )

Member Avatar for perniciosus
0
447
Member Avatar for heavyc

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

Member Avatar for perniciosus
0
192
Member Avatar for taha umar

[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 ?

Member Avatar for perniciosus
0
163
Member Avatar for systest

[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 …

Member Avatar for perniciosus
0
90
Member Avatar for sahil_logic

[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++) …

Member Avatar for dwks
0
146
Member Avatar for ToySoldier

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!!!

Member Avatar for perniciosus
0
224
Member Avatar for drew010
Member Avatar for smicer

[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 …

Member Avatar for perniciosus
0
185
Member Avatar for shahid

Background: I somehow got this notifiation via Google Desktop So... I just wanted to say Lol... /pern.*/i

Member Avatar for perniciosus
0
94