137 Posted Topics
Re: You should put the numbers at some place... and check every one of them... That is an extremely easy solution. | |
Re: Can you add a semicolon after MYVAR(DLLINFO, DllInfo), like MYVAR(DLLINFO, DllInfo); It may cause an error, if I assume that it is line 20 of vars.h. | |
Re: Do a search on the Djikstra Algorithm for Graphs. Enter it on Google. | |
Re: About the first post, it is a good programming practice to put the character code inside a const variable. Instead of hard-coding the ASCII code of the character, just put the constant. It is more elegant and is very useful if the character is not the wanted one (instead of … | |
Re: First, indent your code. It is more readable in that way. Second, how will you find the answer with a pencil and a paper? Answering this question will lead to the structure of your program. Understand the equation first and compute it after! Don't hesitate to use functions to wrap … | |
Re: For the next tips, I will assume that you know object-oriented programming: 1) Think about how you will represent your tree. I suggest that you take a pencil and a paper and draw a binary tree. 2) What will you do on the tree? (Insertion, deletion, ...) How will the … | |
Re: This is a character-by-character copy of the source file to a destination file. This is what the code does. | |
Re: Yes, they exist. Go for online help on the menu bar (in help) and they will be here. I recommend you this site. It contains a lot of documentation. [url]http://www.scheme.com/tspl3/[/url] | |
Re: SRL (Shift Right Logical). This instruction shifts all the bits to the right from a given number of positions. For example, if I do SRL on 0011100 with 3 positions, the result will be 0000011. You should see the documentation of the processor you use to know if the shifted … | |
Hello, everyone. Is there a program on Linux that displays all the processes that are holding a reference (or handle, I know that it is a Windows word) on a specific file? You know, like Process Explorer on Windows. That will be very useful for me. Thanks for your answers. | |
Re: This is what I suggest to you: 1) You will take your FileToArray() function and you will test it with all the possible limit cases (even if they are stupid). If there's no problem, then you will remove it from the post. 2) Do you know JUnit? I strongly suggest … | |
Re: Use &type_of_gas instead of type_of_gas. Without more code, I cannot help much further. | |
Re: Looks like an homework question. Look here. [url]http://www.cplusplus.com/reference/iostream/istream/[/url] | |
Re: This is not a C++ question. Just think about how you will represent it and if you have problems with C++, your post will be more likely to be solved. For the update, do a search on the Observer design pattern. That will be a good start. | |
Re: The last << causes trouble. [CODE] cout << "Area is:" << a << "for radius of:" << r << ; [/CODE] Remove it. | |
Re: You can use Getopt. Here is the link: [url]http://perldoc.perl.org/Getopt/Long.html[/url] | |
Re: And if you want to use templates (to do a list of int, of string, of any type), replace: [CODE]class List[/CODE] by [CODE]template typename<TYPE> class List [/CODE] In an another file (.cpp), implement your functions like this: [CODE] template typename <TYPE> void List::first() { } [/CODE] And I hope for … | |
Re: It's simple. This is a method of the Wallet class that takes a Wallet as a parameter, takes its amount of money and adds it to the Wallet on which the method is invoked (this). The other wallet has its amount set to 0. To find the error, create the … | |
Re: From this code without using code tags for C++, I can't see the presence of spaces. Is (VectorA^VectorB) a Vector variable? It can be a quote (") problem. Make sure that there are spaces at each side of the << . | |
Re: It looks correct. | |
Re: The best way to do this is with the modulo operator. (%). It returns the remainder of the quotient of 2 integer numbers. | |
Re: Add #include<iterator>. It may help. | |
Re: Do a good analysis. It is the purpose of this assignment to solve a complex problem. And for c_str, look at this page: [url]http://www.cplusplus.com/reference/string/string/c_str.html[/url] | |
Re: For appending a string with another, use the append() from the string type. Use this link for more info: [url]http://www.cplusplus.com/reference/string/string/append.html[/url] For converting a string to an integer, use atoi() function from the C library. For converting an integer to string, use itoa() function from the C library. | |
Re: Check if you are accessing memory that you have not allocated. Are you using an invalid pointer? Are you using pointers? Are you referencing an iterator on the end of a vector? (ex: it.end()) Without source code, I cannot give you more advice. I hope that this tips will help. | |
Re: You will need cin, cout, printf(%s, "a std::string".c_str()). Read the documentation about it. Looks like an assignment. Good luck. Design your program before attempting to code. | |
Hi, everyone! If you have worked on ACE, this is the post for you. I want to ensure that all the buffer contents of a file are on disk. So I want to use a fsync() or a fflush() function. I'm working with ACE_HANDLEs. Unfortunately, my searches concluded with this: … | |
Re: Use rand() function. If you want truly random values at each program execution, use srand() function and put time() (returns the time in seconds since a given start moment) as the parameter for srand(). Again, look for other references for more info about these functions. | |
Re: You can use gdb to debug your program. The following link can help: [url]http://www.cygwin.com/cygwin-ug-net/gdb.html[/url] | |
Re: Use regular expressions. Here is the link: [url]http://www.troubleshooters.com/codecorn/littperl/perlreg.htm[/url] | |
Re: Put all the code for input into a do-while loop. For example: [code=java] do { //Input... } while (//The variables have their correct value); [/code] | |
Hello everyone. I am using ACE and I'm using the following method: ACE_OS::read(char* buffer, int nbbytes, int perms); I was informed that Windows is reading data from disk sectors and it puts the contents of the read sectors into the cache (who is in memory). I don't want that behavior … | |
Re: Two possibilities here: -the String of Venn is null. -p is null and that is why the message is not printed. Use System.out.println("Debug messages") to trace the execution of the code. This will help. | |
Re: It's easy to do with a command-line interface. You can emulate a console interface and navigate through your file system. It is easy to implement "ls" with iostream of fstream. You will have plenty of fun to do it. | |
Re: I don't see brackets surronding the parralelIterative function. If this explains the error, it will be good. Also, a semi-colon after the parralelIterative line is not correct. | |
Hi, everyone. I am doing a performance test on the heapsort. I wrote this program and it has a run-time error that I cannot explain. I am compiling on Microsoft Visual Studio 2008 and this is the error. HEAP CORRUPTION DETECTED after Normal Block ... well, I think that the … |
The End.