15,300 Posted Topics
Re: [QUOTE=ithelp;487454]Open the file in vi and match braces.[/QUOTE] That has to be the one most useful features of any program editor, other than of course the ability to type. And most good editors have it -- probably stolen from vi. It doesn't work well though if the code contains braces … | |
Re: Well, [URL="http://www.codeguru.com/cpp/w-p/printing/article.php/c2933/"]here [/URL]is one way to do it. You can download a demo project that contains complete source code. [URL="http://www.codeproject.com/KB/printing/lineprint.aspx?print=true"]Here[/URL] is another with a little more explaination of how to use it. I'm sure if you search [URL="http://www.google.com/search?hl=en&q=line+printer+c%2B%2B+class&btnG=Google+Search"]these google links [/URL]you will find other ways. | |
Re: What is your question -- perhaps you forgot to post it? If you have a question about the code you posted then you have to tell us because we are not mind readers. | |
Re: [icode]vector<int> ds;[/icode] does not go in a header file but in the *.cpp file, unless of course it is a member of some much larger c++ class which you didn't post. [code] vector<int> ds; ds.push_back(0); [/code] If the above still does not work then you are doing something wrong some … | |
Re: line 16: semicolon is missing at end of the line. | |
Re: [QUOTE=jasimp;486799]Do you need any help because according to the title of your thread you do.[/QUOTE] He needs help all right, but it's not the king of help any of us can give him. | |
Re: [QUOTE=joshSCH;482742]*Disclaimer* This is just a theory that seems to fit the evidence and statistics I posted. Do not label me a hick/racist/redneck. I am in fact a college student who scored in the 95th percentile on the SAT, was ranked at the top of my class, and who is currently … | |
Re: >>should I include that as an extern variable as well? No. All you have to do is include the head file that defines the struct at the top of example.h. And don't forget to use code gards in both head files. | |
Re: start [URL="http://www.student.cs.uwaterloo.ca/~cs240/old_courses/Winter06/handouts/set08_dictionaryADT-shandout.pdf"]here[/URL] | |
Re: If all you want them to hold is a single character then you don't need them to hold strings. You can simplify the table to this: [icode]char* tab_veld[80];[/icode] which is an array of 80 pointers (or 80 rows of unspecified number of columns). If you want each row to have … | |
Re: Yes I agree with iamthwee -- you should just scrap that whole program because it is horribly wrong. Start with the basics by reading an introduction to c book from page 1 and don't skip ahead. I could point out a few problems in your code but there are so … | |
Re: The loop that begins on line 11 of the code you posted: where in that loop do you increment [b]g[/b] to point to the next node in the linked list? Don't you want something like this? [code] while(g != NULL) { ... <snip> g = g->next; } [/code] Also I … | |
Re: Never smoked or smelled pot, so I have no idea what it smells like. But I do like the smell of a good old fashioned bond fire or a fireplace. Some flavors of pipe smoke are good too, but you have to be the smeller and not the smoker in … | |
Re: To remove punctuation you will normally have to rewrite the entire string to avoid the many problems with modifying string literals passed to the function. Just iterate through the string one character at a time and copy the character to the new string only if it is not a punctuation … | |
Re: >>would any of you guys mind to go to this site and sign this? No. What makes you think we need to interfere with mother nature ? | |
Re: >>I could not have them done Does that mean no one else will do your homework so now you are begging us to do it ? I don't think you will find anyone here willing to do your homework either. Hint: I [b]think[/b] what your assignment is asking you to … | |
Re: >>strcpy(&is[i],im[0]); Look at the second parameter -- it is not a char* That line can be written without using strcpy() [icode]if(is[i]=='d') is[i] = im[0];[/icode] or even more simply [icode]if(is[i]=='d') is[i] = 'p';[/icode] | |
Re: Do the program one step at a time and soon you will have it done. Looks like you have the first two requirements written -- counting the commas and spaces. Next you will probably want to count the number of "the" words. After line 16 add another loop using [b]strtok()[/b] … | |
Re: the link you posted doesn't go to a tutorial. Did you download the precompiled package or the source code and compile it yourself ? | |
Re: >>I have a practical exam after 1 hour You gave us just one hour to respond ? :) :) Please read the DaniWeb rules. BTW: how did you do on the exam ? My guess is that you flunked it. | |
Re: all you have to include in your program is windows.h and it will include all the others that are needed. | |
Re: [QUOTE=ma7boob;482946]i had an error in the visual studio 2005 that for no reason, the menu bar is no longer there !!!! i cannt see the "File", "Edit", ....... menus even the help menu is not there so i contacted microsoft by e-mail, support, and telephone..... the didnt reply, they just … | |
Re: Great going, and good luck in the future. Hope you passed the class with flying colors :) :) :) | |
Re: why do you need such huge arays? The [b]calc[/b] function at line 97 only uses a 30x30 array. What compiler are you using? From the errors you posted my guess is that you are using ancient/fossile such as Turbo C. Use a modern 32-bit compiler such as free Dev-C++ or … | |
Re: >>Using the !(in.eof()) thing gives me an extra line at the end Yup -- that's why we never use eof() like that. Here is one way to do that loop [code] while( in>>a ) { // your code here } [/code] | |
Re: >>yeah, with that values. I'm still having a hard time figuring out because the ini file that I generated in windows is compose of wchar_t characters Ohhh that is not very good. The sizeof(wchar_t) in Windows compilers is not the same as in *nix compilers. The last time I checked … | |
Re: >>.\Final.cpp(83) : So why didn't you post the code that's in Final.cpp ? line 56 of the code you posted: [b]ItemRemove[/b] is a std::string while [b]*IteratorList[/b] is not, so the comparison is illegal, unless you wrote an == operator, which you did not do. | |
Re: I never type it manually -- just click a link. No point in wearing out my fingers :) | |
Re: [QUOTE=riskbling;481649]You can use my site if you wish. It is password protected to avoid risk of being found. <snip> Cheers[/QUOTE] This is one time I wish I knew how to hijack your web site to that I could trash it. Anyone stupid enough to post the user name and password … | |
Re: We have to be very careful not to get bitten where I live because mosquitoes may carry [URL="http://www.cdc.gov/ncidod/dvbid/westnile/index.htm"]west nile virus[/URL]. So we try to avoid being outdoors for long periods of time especially at night. There are normally a few deaths in my area each year from those insects. I … | |
| |
Re: cbSize is a member of a structure that you set to the structure size before calling win32 api functions with it. For example: [code] struct foo { unsigned int cbSize; // blabla }; struct foo MyStruct; MyStruct.cbSize = sizeof(struct foo); [/code] | |
Re: The function appears to be sending some characters someplace, such as across a socket or serial port. >>what does it do exactly with the string(z=p[i])? I don't see that in your post | |
Re: >>string filePath = FullPath.GetFileTitle(); std::string does not have a method called [b]GetFileTiele()[/b]. That is in the CStirng class :) you can use stringstream class [code] #inlcude <sstring> ... int ID; stringstream stream(groupID); stream >> ID; [/code] | |
Re: line 23 needs to call malloc() to allocate memory for the name then call strcpy() to copy the name. Hardcoding the number of filename pointers in your program is ok only if you know in advance the maximum you will need. But what happens to your program if there are … | |
Re: line 22 in the drawscr.h is causing the problem because that header file is included in both *.cpp files. That line is actually declaring a pointer named [b]message[/b]. To correct this remove the declaration of [b]message[/b] from line 22 and declare it as [b]extern[/b] [icode]extern strucvt MsgStock* message;[/icode]. Then in … | |
Re: Your program has some mismatched { and } bracket. Proper code alignment should show these up right away. The function at line 150 has this problem. line 43 is syntax error. You did not specify a parameter for the time() function. | |
Re: >>What is pre-module basis The HINSTANCE is used to identify a specific process (program that is running). Program A will have a different value of HINSTANCE than program B. Or that's the way its supposed to work. | |
Re: line 69: getSSN is not a function. Look it in the class declaration -- you forgot to add the () parentheses so all you have there is a pointer. Same with getSalary(). line 114: [b]yearsEmployed[/b] does not exist. Check the spelling. Now look at the remaining errors one at a … | |
Re: >> ch = cin.get(phrase); the get function doesn't take a parameter | |
Re: for cross-patform [URL="http://www.gtk.org/"]GTK[/URL] is a popular choice. | |
| |
Re: [QUOTE=edouard89;482706]i read from the file using this: [CODE]fscanf(in, "%[^:]:%[ ^:]:%[ ^:]:%d:%lf", empNum, lName, fName, &pGrp, &hrsWorked);[/CODE] [/QUOTE] I tested this and it works: [icode]fscanf(in, "%[^:]:%[a-zA-Z0-9]:%[a-zA-Z0-9]:%d:%lf", empNum, lName, fName, &pGrp, &hrsWorked)[/icode] | |
Re: Tom & Jerry, Heckle & Jeckle, Popeye (I live about 40 miles from his home in Southern Illiinois), Mighty Mouse, Deputy Dog just to name a few. Also enjoyed many of the cartoons when my children were kids. I still enjoy watching those old cargoons, especially Scooby Doo. Don't like … | |
Re: Don't know the answer, but is this a c++ question??? | |
Re: Same answer as [URL="http://www.daniweb.com/forums/thread99552.html"]this post[/URL] | |
Re: Can someone help you ? Yes, but only if you post the code you have written. Will someone write the program for you? No. This is not a software whorehouse. | |
Re: And now back to the original problem: If all you want to do is make a copy of a file you don't need to do all that forking and other stuff. This is a very very basic problem that can be done in a short few lines of code. Using … | |
Re: Just replace [icode]int array[][/icode] with [icode]std::string array[][/icode] and [icode]int my_value[/icode] with [icode]std::string my_value[/icode], the rest of that will not change. | |
Re: The problem is that SSN and GRADE have not been declared yet. To fix move lines 24 thru 32 up to just under line 13. |
The End.