15,300 Posted Topics
Re: It will also depend on your network connection speed. I'm also using Chrome, my rep graph is pretty large, and my profile page loads with no problems. Maybe there should be an option to turn off that graph so that people with slow connections don't have to wait so long. | |
Re: I don't quite understand how the data is to be sorted. Is it according to column 2 minus the value of column 3?, for example for Kelvin it would be 170-58 = 112 Put the data into a structure then sort the structures struct data { char name[20]; int a1; … | |
Re: Generally GUI programs can have other threads that do background work such as performing long calculations. Post your program and compiler's error messages that you can't get to work and we will see how to help you. | |
Re: The best way is to use portable libraries such as QT and boost. That way you write just one program without all those preprocessor statements. There are quite a few cross-platform libraries to choose from, which one you choose will depend on what you are trying to accomplish. I've heard … | |
Re: You need to create a structure that holds the information for one person, then create an array of those structures. As the file is read you will populate each of the structures in the array. After file reading is finished, you need to sort the array of structures. There are … | |
Re: I used vc++ 2012 RC to debug the program. The problem is that the value of elm in function eval() is '\0' and the switch statement doesn't handle that value so it returns crap since you didn't initialize the return variable. The string returned by in_to_post() has an embedded '\0' … | |
Re: >You can do what deceptikon suggested or just declared the string as Almost right, you need to surround string literals with _TEXT() macro or _T() macro, they are both the same. TCHAR temp[10] = _TEXT("abcd"); | |
Re: maybe [this will help you](http://stackoverflow.com/questions/9043805/test-if-two-lines-intersect-javascript-function) | |
Re: My sister -- she is still alive but I've always looked up to her as if she were a Goddess. | |
Re: Hummm -- I think Dani needs to sue Microsoft for about $10 Billion because DaniWeb had that color scheme first. | |
Re: You won't find anyone here who will write your program for you, so you might as well try to do it then post the questions you have. | |
Re: lines 22-27: if statements that have more than one line require { and } around them. line 24: use a different variable because j is used as loop counter on line 22. line 25: That line does nothing. You need something like this: A[j][i] = X; where X is the … | |
Re: line 40: That ctr is expecting a double as the last parameter, not a pointer. Remove the & before RetailPrice. | |
Re: what you need to solve that problem is to study is [probability theory](http://en.wikipedia.org/wiki/Probability_theory), not computer science. Pay attention to the section Discrete probability distributions | |
Re: Your macro is wrong \#define BUFFEFR_SIZE 5 You don't put a variable name in the macro char buf = BUFFER_SIZE; | |
Re: line 18: can't do that because there is no memory allocated for the vector. Data.push_back(Pixels[(Foo.Height() - 1 - I) \* Foo.Width() + J].RGBA.B); If you can calculate the size needed beforehand, then call Data.Resize(X) to allocate all the memory at one time, then I think the rest of your program … | |
Re: Without better formatted code I can only guess the problem is mismatched { and }. | |
Re: line 26: never, ever for any reason call main() from within your program. That function is reserved for call by the operating system, not your program. Instead, add a loop around all that code. line 33: syntax error because that line isn't inside any function, at least I don't think … | |
Re: The screen shots are unreadable -- copy and paste your code into DaniWeb's code editor so that we can see it better. | |
Re: It's not a pointer problem, just output problem. Try adding fixed to cout outFile << "Value: " << fixed << company[i].budget_value << endl; | |
Re: Or you could just write your own program. What's so difficult about writing a program that does nothing more than blindly split a file into small chuncks? It could be written in maybe 15 minutes. Of course people who don't know how to program couldn't do that, but that's not … | |
Re: clock() is a stanadard function that's in (usually) milliseconds. | |
Re: If you marked the thread solved and later find that you have more questions about the same topic you can change the thread to unsolved then continue the discussion. | |
Re: there is no such index value as company[15], the indices are numbered 0, 1, 2, ... 14. A safer loop is to use integer, not pointer, in the for statement. Attempting to use ptr like you did is not safe because it depends on how the computer's memory is laid … | |
Re: are those hex values? Are you certain there is a comma between words? e.x. 0010 and 0440? One way to do it if with int ival; fscanf(%x", &ival); | |
Re: >warning C4244: You are getting that because the program is assigning a double to an int -- for example assigning a double value to Mercury. That's not really a problem unless you expect Mercury to have fractions. The way to remove such warnings is to convert the result of the … | |
Re: 1. PC, mem_CARD, soft_WARE, and disk_DRIVE should be an int, not double because you can't by a fraction of those items, whole numbers only. Use the data type that is appropriate for the thing you want it to represent. >mem_CARD + MEMORY_CARD You need to multiply those numbers, not add … | |
Re: >So,the coding will be compare all integers with 0 and save according in two different files right? Correct. >If I am right then how to store it in files? See FILE\* file handling functions (a tutorial is [here](http://www.functionx.com/cpp/articles/cfileprocessing.htm)). >Can we save it in already existed file? Yes, see the above … | |
Re: I compiled your program with vc ++ 2012 and, after changing a couple things to make it compatible with new compilers, it worked as expected for me. I don't have Turbo C so I can't tell you if its your compiler or not that is causing the problem. Or maybe … | |
Re: >But HOW? I have no idea -- ask your teacher how to drive the priority list from the matrix. >>main() Learn to program correctly -- it's int main(), not just main(). There is int before the function name. | |
Re: There is no difference as far as efficiency, references are actually implemented as pointers. The difference is in safety because references can not be changed once set. | |
Re: Use two loops, one nested inside the other. The outermost loop counts rows (1-5) and the inner loop counts from 0 to the value of the outer loop. | |
Re: You don't. The computer that is running the vb program must also have the Access odbc device driver and the Access database file. If you mean you want to call Access from your vb program then read one or more of [these tutorials](http://www.google.com/#hl=en&sugexp=les%3B&gs_nf=1&gs_mss=vb%206.0%20Ac&cp=13&gs_id=1g&xhr=t&q=vb%206.0%20Access%20database%20connection&pf=p&output=search&sclient=psy-ab&oq=vb+6.0+Access&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=53a17e24ef004a70&biw=1032&bih=493) | |
Re: yes. See [ODBC tutorials](http://www.easysoft.com/developer/languages/c/odbc_tutorial.html) and [SQL tutorials](http://www.google.com/#hl=en&sclient=psy-ab&q=sql+tutorial+for+beginners&oq=sql+tutorial&gs_l=hp.1.2.0l4.1365.3364.0.6307.12.8.0.3.3.0.103.632.7j1.8.0.les%3B..0.0...1c.1.e_9JdH05sH0&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=53a17e24ef004a70&biw=1035&bih=493) | |
Re: Why use an array? Just sum the numbers as they are entered then print the result when finished, no need to keep them. start of loop enter a number if number less than 0? if yes then exit the loop sum = sum + value of number entered end of … | |
I've noticed for some time now that the ribbon frequently is not fully visible as if it is getting painted below the bottom of the browser's window. If I change larger font size (Ctrl+mouse wheel) it shows up again, making font smaller it disappears again. I'm jusing Chrome. It works … | |
Re: You want to call the win32 api funcgtion GetOpenFileName(), [here's ](http://www.daniweb.com/software-development/cpp/code/217307/a-simple-getopenfilename-example)an example program. You can call it from a standard console program that uses main() if you wish instead of from a win32 program that uses WinMain() | |
Re: use fgets() to read an entire line at one time. But since you are using c++ you really need to learn the <fstream> and <string> library fuctions. #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> int main() { FILE *fp1; char line[255]; fp1=fopen("data1.txt","r"); while(fgets(line, sizeof(line), fp1) != NULL) { printf("%s ",line); } fclose(fp1); printf("\n\n"); … | |
Re: win32 api has no function that reads one line at a time such as fgets() and getline() do, instead they do binary reads similar to fread() and fstream.read(). If you want to read a file in text mode then don't use win32 api functions but standard C or C++ file … | |
Re: nitin1 is correct, the question is not c or c++ related, but how to use a modem. | |
Re: >Everyone makes mistakes, it's a fact of humanity. I only made one mistake in my life, that was when I thought I was wrong, but I was wrong about that. | |
Re: [URL="http://www.codexxi.com/MyBlocks.html#atConsoleObj"]Here's[/URL] another link that may interest you. | |
Re: \n is an escape character that moves the cursor to a new line \b is backspace \r moves the cursor back to the beginning of the current line So if you use pencil & paper to draw the characters on paper and follow the above escape characters you will see … | |
Re: If you are printing the results to the screen, post the code that prints it. It might be just a display problem instead of a problem with the data. | |
Re: Which version of vc++ Express did you install? Earlier versions did not contain windows.h or related headers/libraries, you had to also download windows SDK. Microsoft includes all that with version 2008 (I think that was the version). If you have the older version then uninstall it and download the latest … | |
Re: list view? What language -- MFC, QT, or are we supposed to guess? | |
Re: [Here](http://stackoverflow.com/questions/7625421/minimize-app-to-system-tray) is C# way to do it, which is almost identical to CLR/C++ (which you are writing). | |
Re: What compiler are you using? Learn to use your compiler's debugger so that you can step through the program and find out for yourself what is causing the problem. |
The End.