15,300 Posted Topics
Re: You need to post function main() that just uses your template to illustrate the problem. That way we can compile and test is ourselves. Right now we have no clue how you are using that template. | |
Re: The size of long double is compiler-dependent, not operating system dependent. What compiler did you use on MS-Windows? I know Microsoft VC++ does not support long double -- the name is recognized the but the is the same as double. MinGW on MS-Windows (Code::Blocks) produces the same results that you … | |
Re: because after answering the "Do you want to continue" prompt you have to enter either Y or N then the <Enter> key. cin >> does not remove the Enter key so its still in the keyboard buffer. There are several ways to remove the Enter key, one of them is … | |
Re: I don't know the answer, but you should no longer use Windows Forms with C++ because Microsoft dropped it support in the newly release VC++ 2012 compiler. I mentioned that only in case you are trying to write a Windows Forms program in CLR/C++. If not, then ignore it. | |
Re: Sorry to hear about your illness, that happens to everyone. When that happens to you after you start working do you really expect other people to do all your work for you?? It ain't going to happen. If you don't remember how to do it then you need to refresh … | |
Re: [QUOTE=deepsukhwani;1159876]So guys, Can you please tell the output?? Which one you found out as the best one for C++?? I am also a C++ Beginner.[/QUOTE] What output? Had you bothered to read this thread you would have seen that it's not about output, but about compilers. Which one is best? … | |
Re: You mean UK government pays people to write web sites? No wonder your taxes are high :) | |
Re: Look at the function prototype on line 7, it has two arguments. Now look at line 16, it is passing only one argument. The compiler is complaining because line 16 is not passing enough arguments. In main() declare an array of ints and add that array as the second argument … | |
Re: You will find the information in any ascii chart, such as [this one](http://www.asciitable.com/). Since C/C++ and other languages represent letters are numbers there is no conversion from one to the other except for typecasting. If you want to display the letter 'S' all you do is typecast it to char, … | |
Re: What's the purpose of the return value on line 49 when the program discards it? That function is not doing its intended purpose according to instruction #4. | |
| |
Re: >> search_nameFile.seekg( ( name - 1 ) * sizeof( phonebook) ); variable name is a std::string -- why are you attempting to treat it as an integer? I would think that function searchbyname() should seek to the beginning of the file then enter a loop to sequentially read each record … | |
Re: I love Dungeon & Dragons games, so I sometimes play online [b]Dungeon Runner[/b]. It can be played for free, or if you contribute $5.00USD/month you get extra stuff and getter playing characters. | |
| |
Re: I think what you are looking for is the source code for the \*nix like tail program. See [this thread](http://stackoverflow.com/questions/1439799/how-can-i-get-the-source-code-for-the-linux-utility-tail) for assistance | |
Re: >>I need to write a program Ok, so write it :) | |
Re: Patrick: contact your local travel agency, they should be able to help you with that. | |
Re: >cl.exe can only be run on Windows 2000, Windows XP and Windows Server 2003 operating systems That's probably an old link -- it also runs on all current versions of MS-Windows. You don't have to use vc++, there are other options such as the popular Code::Blocks with MinGW compiler. Any … | |
Re: ascii value is not related to operator precedence. | |
Re: Your program is not checking for the existance if the file, it just assumes the file always exists. You need to check for NULL return from fopen() and do nothing if NULL was returned. BTW: Don't call rewind() after fopen() because its a waste of effort, the file pointer is … | |
Re: Put $5,000USD in my PayPal account and I'l do your homework for you. Otherwise, if you don't want to do that, I guess you'll just have to solve it yourself. How do you get 32, 42 and 52 from that data? | |
Re: >>Can someone please finish this off, No, we don't do your homework for you. | |
Re: most rep points are produced by members voting a post with the up or down arrow and leaving a comment. No comment means no points given. Other rep points are given by the system after certain intervals of posting, new members are given 10 points. The amount of points you … | |
Re: strcpy() is wrong because it takes two character arrays as arguments, not two single characters Your second example on line 17 is correct way to do it. But you didn't really say what the expected output should be so I can't say whether its right or wrong. | |
Re: I don't have your compiler (Turbo C) so I can't test your program, but the cause is normally because you are attempting to write more to the screen than the screen can hold, so the operating system scrolls the screen up to make room at the bottom to add more … | |
Re: what exactly do you mean? a matrix with random number of rows and columns? a matrix that contains random numbers? Both? In order to work with a matrix with random number of rows and columns you need to know how to work with pointers, each dimension requires one star, so … | |
Re: The function passed to _beginthread() must be either a C/C++ standard global function or a static method of a class. You can't pass non-static class members because they do not exist at compile time. Make DrawLines() a static method of the class and it should compile. This is not peculiar … | |
Re: you must always ship the zlib1.dll with your program unless they provide a static-link library. You always have to put it in the same folder as your program or one of the folders listed in the PATH environment variable. The statement "during testing" is a little misleading. If you have … | |
Re: read previous posts and links then write it yourself. | |
Re: Same problem reported [here](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/436118/problem-uploading-images) yesterday | |
Re: I just ran Narue's test on my XP, 2.41 GHz AMD Processor, 1 Gig RAM and pretty fast video card. [quote] printf: 9.75 cout: 10.359 [/quote] compiled with Visual C++ 2005 Express editiion in release mode. One problem with such as test is variance in speed of hardware -- you … | |
Re: even vc++ 2012 which was just released does not support long double., | |
Re: In the loop on line 31 you are displaying all the letters 'A' through 'T' on the same line. What you need to do is put a line break when the loop counter reaches the number of columns input on line 20. You will probably need two counters, one that … | |
Re: >If the C source code file is written in C and I can't compile it in a C++ compiler (so I'm told) They told you wrong. There is no problem at all mixing C and C++ files in the same program, I've done it several times. It's all in the … | |
Re: repartition and reformat the hard drive. | |
Re: getline() is a c++ function not useful in C programs. As for fgets() being unreliable, it isn't if you use it correctly. If you know bigDaddy is big enough why not just use that as the parameter to fgets() instead of buf? In any event, the program needs to execute … | |
Re: Is creature.h spelled "creature.h" or "creatures.h" -- your program contains both spellings. | |
Re: >>Thus to convert a lowercase to an uppercase letter, subtract 32 from it. Wrong -- that could be disasterous if done dimwittedly. The macro toupper() and tolower() should be used to convert a character from upper to lower, or vice versa because it is part of the C and C++ … | |
Re: Your program could be improved by better use of if statements and using only two FILE\*pointers. #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> int main() { int opt,opt1,a; int x, index; char fn[15],ln[15],sn[15],data[15],line[225]; char locate[15]; FILE *fp1, *fp2; char* filename; printf("\t\t\t\t*****MENU*****"); printf("\n\n\n"); printf("\t\t\t\t***STUDENT PROFILE***\n\n"); fp1=fopen("2003.txt","r"); printf("2003 Student Enrollies\n\n"); printf("Student Number \t\tFirst Name \t\tLast … | |
Re: What you are describing is socialism, not communism. Communism asserts that the state owns everything, no private person can own anything, and that goods and services distributed among the people according to need. Also communism does not allow free elections, or free anything else either, such as religion. Communist coutries … | |
Re: I haven't see it and I'm using IE9 which I just reinstalled last night. | |
Re: Since code always contain line numbers (at least in the C/C++ forums it does) I see no reason to quote it, just refer to the line number(s) should be sufficient. | |
Re: It works ok in Chrome, so it must be an IE9 problem where the login screen does not appear. | |
Re: When you create a DLL the compiler will generate two files -- one with dll extension and the other with lib extension. Then when you compile the application program (console or windows) you tell the commpiler to link with the DLL's \*.lib file. You will have to manually create a … | |
Re: count the rows as the data is entered. When you enter a negative value then stop the loop. For example: int row = 0; int value = 0; int done = 0; while( !done && row < 10) { int i; for(i = 0; i < cols; i++) { scanf("%d", … | |
Re: Note: If you want to write this program on MS-Windows os you may have to use _open(), _read(), and _close() instead of the functions specifid in your assignment. Also include header files io.h and fcntl.h There are a couple ways you can write the program: 1. Just use an array … | |
Re: You can export the entire class without specifying individual methods like below code snippet. For more thorough explaination see [this link](http://www.codeproject.com/Articles/28969/HowTo-Export-C-classes-from-a-DLL) class __declspec(dllexport) Derived : public Base { ... }; |
The End.