15,300 Posted Topics
Re: I started wearing glasses when I was in 9th grade -- nearsighted. I started computer programming in my 40s and got a lot of eye strain from staring at those green monitors -- it was really painful. Monitors are a lot better today with almost no eye strain at all. … | |
Re: line 44: remove the semicolon. As it is, it's just a function prototype. line 46: [ignore() ](http://www.cplusplus.com/reference/istream/istream/ignore/)removes one or more keys from the keyboard buffer. When you come across a function that you don't know what it does you need to use google to find out about it. | |
Re: There is a different form of getline() that is used with std::string. `line.getline(someStream);` After the above all the characters are in the std::string line. Why would you want to copy them to a character array? You don't need a loop to do that, just this one line. But there is … | |
Re: min and max do not work with floats -- use only integers with those macros. For floats you have to use fmin() and fmax() | |
Re: The way I understand it -- and I'm no expert on the subject -- is that Cloud Computing is nothing more than storing data on someone else's server so that you can access it by any computer that has the correct permissions. It's similar concept to having an external hard … | |
Re: >However, the more veteran members (many of which no longer participate) were able to rack up quite a bit of reputation points over the years in these categories. DaniWeb has not allowed rep in Community Center for several years now. I don't know how many I got from there but … | |
Re: You first have to have a C++ compiler. There are several free ones, including (but not limited to) Code::Blocks, and Visual Studio Express. Just google for them and you will find the download links. If you want Code::Blocks get the version with MinGW compiler. That is a popular compiler/IDE for … | |
Re: Don't worry about it -- airport security are just too busy to thoroughly search all the files on everyone's computers. All they want to see is that the computer is indeed a computer by turning it on to make it work. They don't really csre about what's on the computer … | |
Re: That could actually be very difficult, depending on what font you use in Notepad.exe. Some fonts are variable width so that the letter M is a lot wider then the letter I. If you use a fixed-width font then your problem becomes a lot easier, just count the number of … | |
When I click the Endorse button everyone shows up in just some random order which makes it kind of difficult to find a specific person. Can (or will) you sort the list alphabetically to make it easier to find someone? | |
Re: return statements do not have a format such as "%f" -- just simply supply the name of the variable to be return. Example: `return netAmount;` | |
Re: When server gets a request from client the server should create another thread and process it there. The exact way to do that will depend on the compiler and operating system you are using. There is no standard way to create threads in C language. Now if you used c++ … | |
Re: In St Louis where I live ground public transport is very good -- trains and buses run every 15 minutes and are rather cheap compared to cost of driving. There is a train station about 7 miles from where I live, I can park there free, ride the train for … | |
Re: You should have started your own thread instead of hijacking this one. But I assume by "any_name" you want to make the table name variable? If that is correct then just use sprintf() or string concatination to construct the whole string in a character array or std::string and pass that … | |
Click the date link should take me directly to the last post of the thread, but it doesn't do that any more. | |
Re: The program would be better if you used a do loop instead of while loop. And you don't need to use the mod % operator in this program like you did in your other program. start of loop display prompt to enter a number call scanf() to get the number … | |
Re: Do the assignment one small step at a time and you will soon be finished. First write the program to ask for the integers. Do you know how to use printf() and scanf()? Once you get that compiled and tested continue with the function IsEven(). Use the % mod operator … | |
Re: please zip up your project source files and attach them to your post along with the makefile you use. We don't want the compiler-generated files such as \*.o so delete them before zipping. | |
Re: iostream.h is obsolete. use <iostream> instead (notice there is no .h extension). | |
Re: The while statement is a loop that contininues to execute until some condition is met. For example consider vriable named x in this simple example int x = 0; while (x < 10) { x++; } In the above the loop will continue until the value of x reaches the … | |
Re: delete lines 9 and 10, then replace them with a line tht declares a FILE* variable, opens the file for reading, then calls fgets() to read the first line of the file into the string variable. | |
Re: >plzzz aj he reply ker dain..mjhay kal apni teacher ko inform kerna ha about my project... Huh?? That makes no sense in Engligh. | |
Re: Nice code -- works perfectly on my computer :) | |
I recently intended to upvote with a comment but accudently upvoted without comment. I then pressed the uparrow again to erase my previous upvote so that I could do it again. I added the comment, pressed uparrow and the comment was accepted, however after I refreshed the page I noticed … | |
Re: When you have a lot of paraemters like you originally posted it is probably better to use a structure because it's easier to read and understand. With individual parameters it can get a little messy later in the program trying to figure out where a variable is declared. With a … | |
Re: Looks great -- maybe I can now get rid of all my remote controls. | |
Re: what exactly is the error? compiler error? runtime erro? you get the "6rror opening file" message in your program? You also need to tell us what compiler and operating system you are using. | |
Re: Just be aware that you should not use malloc(), realloc() or free() in c++ programs because they do not call c++ class constructors or destructors. Instead, use new and delete. Unfortunately there is no c++ equivalent of realloc(). | |
Re: AFAIK there is no such thing as "far" and "near" pointers on platforms other than ancient 16-bit MS-DOS (and maybe some obscure embedded systems)-- the flat memory model doesn't have segmenets, unless you might say everything is in near segment. | |
Re: line 76: I don't see where pointer p was ever initialized. That means function add() is getting an invalid pointer parameter. Maybe you need to rethink how add() is supposed to work. IMHO add() should increase the array size by 1 each time it is called, and the first parameter … | |
I can't get IE10 on Windows 8 keep the address of my desired Home page. I want to use google.com as the home page, I go to Internet Options, Use Current Page as home page, then save. It works for only a few minutes before reverting back to blank address. … | |
Re: Read [this](http://www.mycsharpcorner.com/Post.aspx?postID=32) | |
Re: I don't see much different about the task bar in Win7 and Vista or XP. One minor difference is that Win7 lets you easily pin any program you want to it. Other than that, it looks just like earlier versions. And the start menu doesn't look any different either. What … | |
Re: You forgot to attach it. Just paste it into your post so that people won't have to look for it somewhere else. | |
Re: First make an int array that has 12 rows (jersies 0-11) and 5 columns (5 bases). See [this article ](http://msdn.microsoft.com/en-us/library/vstudio/9b9dty7d.aspx)how to declare tw-dimensional arrays. Then you need to create two loops, one inside the other. The outer loop is for each of the 12 jersies, while the inner loop allows … | |
Re: that turbo c++ program is using deprecated header files -- you will have to change the code to use current c++ standards, such as <iostream> instead of <iostream.h> There will most likely be other code changes you will have to make, such as std::cin or using std::cin statements. | |
Re: Call time() from time.h to get time of registration. I assume time of registration is when SetPatientInfo() is called. As for treatment time -- you will most likely have to get it as a string from user input at the keyboard. | |
Re: I had my son build me a game computer about a year ago when Diablo III was released, it cost about twice what you posted. One of the components was a Gigabyte motherboard, it lasted about 6 months before components started going out. Eventually I replaced it with a Asus … | |
Re: SelectString() does not search for whole strings, only for the number of characters that are in the second parameter. So if you pass "-1" then it will consider "-12" as a match because it only looks at the first two characters. To solve you problem you should call SelctString() again … | |
Re: what compiler did you use? And what operating system? The function want_secs() is completely unnecessary. If you want your program to wait for awhile then use os-specific api to do that so that other processes can get CPU time instead of your program hogging it all up. MS-Windows: win32 api … | |
Re: char *hex2Value=""; while(*p) { //printf("\n\nstr: %s\n", p); asprintf(&hexValue,"%s%02x",hex2Value,p); And just how do you expect the above to work? hex2Values is just a pointer that points to a single byte of read-only memory. I don't know what asprintf() does (it must be a non-standard function) but it certainly can't successfully write … | |
Re: I just finished posting a program on a web site found [here](http://www.daniweb.com/business-exchange/website-reviews/threads/454770/review-our-new-project-snippets.pro) that does just that for a different web site. The only thing you could probably use from my program is how to use sockets to access the api from DaniWeb. I have not gone tough DaniWeb's api yet … | |
Re: Every version of MS-Windows is shipped with a free assembly language debugger. It's located in the c:\windows directory (or wherever you installed the operating system), and named debug.exe [URL="http://users.easystreet.com/jkirwan/new/x86lrn03.html"]This[/URL] is a brief tutorial how to use it. | |
Re: why don't you just upgrade to Visual Studio 2012? The express version is free. | |
Re: Do you mean [this](http://www.codesynthesis.com/~boris/blog/2012/04/18/cxx11-generalized-attributes/)? | |
Re: >(Hint: Use the function gets Fire that teacher! gets() is a horrible function, allows buffer overflow, stack corruption, and possibly crash the whole program. Use fgets() instead of gets() to limit input to the max size of the buffer. fgets() has a couple quirks too, but they can be easily … | |
Re: Maybe here at DaniWeb in Geek's Lounge or in Website Reviews. |
The End.