5,331 Posted Topics
Re: Most library header files these days are C++ safe, using the aformentioned `extern "C" {...}` constructs necessary to make C++ use C linkages for these functions. If you do include a C header that is not C++ safe, then the linker will likely complain about missing symbols. That can be … | |
Re: I wrote my first smart-pointer class in the early 90's which implemented a reference-counting garbage collection pattern. It is used for the most widely utilized manufacturiing execution systems software in the semiconductor, flat-panel display, and disc drive industries. In 10M lines of code, there are no deletes and no memory … | |
Re: What is the internal controller you are using for the robot? Figuring the wired webcam is USB, does the internal controller have a USB port? What OS is it running? | |
Re: There are a lot of java tutorials on the Oracle web site that may help understand what you are trying to fathom. In any case, here is a link to a page on Oracle's java site that explains it clearly: http://docs.oracle.com/javase/1.5.0/docs/guide/language/static-import.html | |
Re: Install Linux in a virtual machine that uses bridged networking (so the VM gets a fresh DHCP address from the family router). Then, use that for web surfing. That should completely bypass the Windows filtering tools. Also, have you tried browsers other than IE, such as Firefox, Chrome, or Opera? | |
Re: What distribution+version of linux are you running? Newer systems use Pulse Audio (as well as ALSA), which should allow you to change your output hardware from speakers to the headphone port. | |
Re: Several things. This function (which should be a const function as in `Element operator+(const Element&obj) const;`) adds one Element to another. That isn't what you are doing. It may work if you have an Element constructor that takes a single integer argument, but in your case, you should create an … | |
Re: The allocation size on the disc should have zero to do with the health of the USB hardware. This sounds a lot like some sort of urban legend. | |
Re: Sounds like this laptop needs a visit to the factory repair depot. | |
Re: There are any number of sata -> esata cables and adapters available for just a few dollars. Try a Google search on the terms "sata to esata adapter". | |
Re: You might try using the inotify enabled version of rsync. | |
Re: Time to switch to Linux... ![]() | |
Re: Are you sure your cable is wired correctly? Try plugging a null-modem adapter into one end or the other. | |
Re: Try printing it out as hex first: for (int i = 0; i < length; i++) { if (i > 0) cout << " "; cout << hex << (int)buffer[i]; } | |
Re: You can also configure your system so that each open explorer window is a separate process (I do that, for security and performance needs). It requires more memory, but is more stable, in my opinion. At least if something causes one instance to crash, all of the others are unaffected. … | |
Re: Well, there are a number of good online dictionaries on the internet. Here are several for English: 1. http://dictionary.reference.com/ 2. http://www.merriam-webster.com/ 3. http://oxforddictionaries.com/ | |
Re: It depends. Both are very competitive and work hard to leapfrog the other. So, it kind of depends upon the day of the week, phase of the moon, and whether you are wearing briefs or boxers... AMD is generally cheaper. Currently, Intel is faster. Either will give you a good … | |
Re: There are freely available tools like wikis to do this. There are versions you can host yourself, or ones that are available on the net, such as www.wikispaces.com. Try a Google search for wiki software. One link is this one, comparing a number of wiki software packages on wikipedia: http://en.wikipedia.org/wiki/Comparison_of_wiki_software | |
| |
Re: The top line of "last reboot" will show the last time you rebooted. The bottom line "wtmp" is not the last reboot time. Also, the "uptime" command will show how many dates+hours+minutes the system has been up since last reboot. If you add that to the top line of "last … | |
Re: Just telling us you have errors is not particularly informative. List your code that is causing the errors, and post the output emitted by the JVM when you try to run your program. | |
Re: Send us the diagnostics that are emitted when the program is run on a command line. ![]() | |
Re: In this code for(int j = 0; j <= st.countTokens(); j++) { basics[j] = st.nextToken(); } try this instead for(int i = 0, j = st.countTokens(); i < j; i++) { basics[i] = st.nextToken(); } also as James said, check if basics[i] is null when you are accessing it later … | |
Re: You don't explain what you mean by "runtime failure #2". Are you running this as a managed c++ application in C#? How did you compile it? What operating system is it running on? What compiler did you use? | |
Re: This is where you start to learn how to write functions, use standard functions, and build related ones into libraries. Example, using your code to build on. Note that the function str2int(const char* numString) can be built into a library that you can link to any program you write, and … | |
Re: I don't see how this could be possible unless you install some bit of software that registers every USB device connected. AFAIK, Windows does not do this by default. IE, if you installed such software, it could tell you about any USB device attached since it was installed, but it … | |
Re: One way is by value, as in void function( int array[SIZE1][SIZE2] ) { // We were passed a 2-dim array of ints. for (int i = 0; i < SIZE1; i++) { for (int j = 0; j < SIZE2; j++) { cout << "array[" << dec << i << … | |
Re: resize2fs is useful if you expand the partition a file system resides upon, or of you bit-copy it to a new drive. Although it can be used to either expand or shrink an ext2-based file system (including ext3/ext4 ones), shrinking one is not recommended as you may well lose data. … | |
Re: Matlab, Wolfram, and other math packages will be suitable for this. There are also such things as SAS and SPSS (now owned by IBM I think). These are all very expensive, but what you are asking for is not simple stuff. I deal with real-time data analytics using many engineering … | |
Re: It would depend upon the GPS device that you have. Some may support installation of a SIM, others a USB cellular modem, and others perhaps neither. In any case, if your GPS device does not support some variety of external communication service, you are SOL. | |
Re: Who gives a fig if it is Anonymous, or anyone else. Blocking TPB is an exercise in futility. In the days just after the blockage began, TPB experienced an increase of about 12M users / day in use... There are myriad ways to route around these sort of blocks. All … | |
Re: 1. Remove the 1TB disc, and install Windows on the 320GB disc. 2. Re-install the 1TB disc. At this point, the correct disc should be booted by Windows. These sort of problems are usually due to what disc responds first to the OS scanning of the hardware. On Linux, you … | |
![]() | Re: You don't indicate where in your code you are calling into tidtable.c, so we really can't help you much. A couple of observations however. 1. Make sure that all pointer variables are initialized (at least to null) when you declare them. 2. You don't validate the pointers that are passed … ![]() |
Re: Some assemblers allow you to do that by terminating a line with a backslash, as in: Symbls db 0,0,0,0,0,0,0,0, 0,2,2,0,0,2,2,0, 0,0,2,2,2,2,0,0, 2,2,2,2,2,2,2,2, \ 0,0,2,2,2,2,0,0, 0,2,2,0,0,2,2,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, \ 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0,0Fh,0Fh,0,0Fh,0Fh,0,0, 0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0Fh,0, \ 0,0Fh,0Fh,0,0Fh,0Fh,0,0, | |
Re: This may help: http://www.kernel.org/doc/man-pages/online/pages/man7/utf8.7.html FWIW, to handle unicode characters, you will need to use the wide character versions of various functions, such ase wprintf() vs. printf(), etc. In any case, this is a pretty deep subject - I once spent the better part of a year implementing internationalization support for … | |
Re: Using increment/decrement operators in function arguments is a common beginner mistake. According to the C and C++ standards, the order of evaluation of the arguments passed to a function is completely up to the compiler writers. So, in the function `void func(a++, b--)` you don't know if a++ will be … | |
Re: Since this is a member of the class (not a static method), you can leave off the first argument and in the body of the method do this: void instream::operator<<(char[] data) { this->someOutputFunction(data); } Just an aside, if this is an input stream, why are you writing an output operator? | |
Re: So, what's your question? | |
Re: Output through the jack should be analog, otherwise it won't work with standard speakers, headphones, etc. Digital output should require something like s/pdif via coax or optical connectors. | |
Re: What about wireless broadband? Can you get 3G/4G cell phone coverage in your area? | |
Re: You'll note that in Mike's example, the code was `delete[] *oldArr` not `delete[] oldArr`. Oh, never mind. I see now that you tried his suggestion using a pointer reference. Personally, these sort of things often bring out compiler bugs. Since you don't say what compiler you are using, I can't … | |
Re: 1. VMware is just now starting to support running Mac OSX in a vmware image. Currently only Lion is supported, but I read today that they will be enabling Snow Leopard support as well. 2. You can only run a Mac OS in a virtual machine that is running on … | |
Re: I have seen situations like this where I had to either tweak the configuration (options to the configure script) so it knew where the headers and related libraries were, and in rare cases I've had to modify the generated Makefile. In your case, this is a bit weird since the … | |
Re: This is C++? Not on any planet I am familiar with, and I have only been programming C++ for 20 years, professionally! One question though, bogus syntax notwithstanding - what is gcnew? Is that a garbage-collecting operator new allocator? From what I know, this is a .NET term, which has … | |
Re: Look at this function: void addtobegining(int i) { struct node*p; p = malloc(sizeof(struct node)); p ->next = i; head = p; } Note that you are setting p->next to i. Try this instead: void addtobegining(int i) { struct node*p; p = malloc(sizeof(struct node)); p->data = i; p->next = head; head … | |
Re: In this case, you already know the number of elements (min(100,sno1)) and size of each element (20). Use those values instead of the computed values, besides the fact that the size argument is not the size of a char*, but is 20. So, your qsort call should be this: qsort(&list[0][0], … | |
Re: Where did you purchase the battery from? From your description, I think that the battery is non-functional. Don't purchase cut-rate brand-x batteries from sources you aren't sure of. Personally, I do purchase brand-x batteries for my laptop, phones, etc; however, I DO purchase them from sources I know will stand … | |
Re: The answer is ... it depends. It depends upon what operating system you run, what type of software you want to use with it, etc. Myself, I like nVidia, but principally that's because I mostly use Linux and there are better drivers for nVidia on Linux than for AMD cards. … | |
Re: On a mobile phone, the GPS won't use the data plan. However, the location functions on most mobile phones will use cell tower triangulation, or WiFi, to locate the device if it can't find enough GPS satellites to get a fix, or if the GPS is turned off. The WiFi … |
The End.