5,331 Posted Topics
| |
Re: Depends upon the OS. For Linux there is the inotify event subsystem. Don't know/care what Windoze uses. | |
Re: What Narue said is all very true. However, to get you on your way, first you need to write the code that can identify variable declarations/definitions, such as: [icode]int a,b,c;[/icode] Next, you need to break out each variable in this list, which requires that you recognize the comma delimiters and … | |
Re: The quoted excerpts are pretty clear to me. What, specifically, are you confused about? | |
Re: Sorry, but we don't solve your class problems for you. If you need some help and/or comments with specific parts of your code, that is another thing, and that we might help you with. | |
Re: This seems to be on a Unix/Linux system, correct? Chances are you have exceeded the amount of memory available to you as specified by your ulimit environment settings. This is to keep individual processes from eating up all system RAM. On my system, since I am the sole user and … | |
Re: To print to another output stream using the C-style printf() functions, you would use fprintf(FILE* fp, const char* fmt, ...) function. However, for C++ it would be preferable to use output stream objects such as ostream, ofstream, ostringstream, etc. You can create your own output stream class that provides the … | |
Re: There are also class static variables that can serve this purpose. The result is similar to the namespace solution mentioned by Saith, but probably better. It is not an uncommon approach to this problem. | |
Re: We don't do homework assignments for people. You need to make the effort to write this program. Then, we might be able to make suggestions to help you understand your mistakes and what to do next. | |
Re: In your example, you are calling the constructor CircularLinkedList(int), which does not initialize the head pointer. You assume that add() does that, which it should, but that is a bad practice. In any case, there are a number of issues. Whatever you do, make sure that you initialize your member … | |
Re: CIFS - Common Internet File System This is the updated version of SMB (Server Message Block), or Samba. Linux systems use CIFS to mount Windows shares, but will use a Samba server to provide shares to Windows systems. CIFS is the protocol. Samba is the application/server code. So, yes Samba … | |
Re: Why convert to string? If you want to print to terminal, just output it to cout, as in: [code] int i = 999; cout << "i == " << dec << i << endl; [/code] | |
Re: re: Ancient Dragon 2 statements: Call program, redirecting input from file and output to results file. 1. while read cin into number and not eof(cin) 2. write to cout number^2 done... :-) | |
Re: Sorry, but we are not going to do your homework for you! Make an effort first, and then we may critique it and give you some pointers, but don't expect a 4 course meal for free! | |
Re: Assuming the motherboard has most of the same features/capabilities as the old one does, and you are reinstalling the original system discs, then probably not. Video chip sets may be the biggest issue. If that changed significantly, then you may need to boot from a rescue CD/DVD and change the … | |
Re: What Ezzaral says, and consider commercial tools as well such as ClearCase. We used ClearCase for a large development organization (one of the 60 largest application software companies in the world) that was spread all over the world (US, Canada, Europe, India, Taiwan, Japan, and Korea), and we were able … | |
Re: So, what is your problem. You want us to analyze your code, but you give no indication where you are having a problem. You have $200USD/hour for my consulting time? Probably not. So, what is your problem? | |
Re: [QUOTE=L7Sqr;1520499]Often times paper and pencil are your best approach.[/QUOTE] Amen to that! :-) | |
Re: [QUOTE=jonsca;1520468][icode] itsRadius [/icode] is a pointer, you need to dereference it before incrementing it.[/QUOTE] Precisely. Ie, [code] /Prefix, increment then fetch const SimpleC& SimpleC::operator++() { ++(*itsRadius); return *this; } //Postfix, creates temp to store original, increment, then fetch const SimpleC SimpleC::operator++(int) { SimpleC temp(*this); ++(*itsRadius); return temp; } [/code] Anyway, … | |
Re: So, if you have RHEL, but haven't a paid subscription, you can't access their repositories in order to get updates, new drivers, etc. However, that is easily fixed. For RHEL systems the package manager is called YUM (Yellowdog Update Manager). It reads files in /etc/yum.repos.d that tell it where to … | |
Re: I often use pseudo code to express clearly what I want to do. However, do try to be consistent. Example, in your IF/ELSE/ENDIF block you assign the calculated amount to the variable Deposit_Amount, but at the end you print Loan_Deposit, and not Deposit_Amount, which is what I think you were … | |
Re: 1. Make sure that the school agrees to this - it is probably illegal. 2. What makes you think it hasn't already been done? :-) | |
Re: [QUOTE=Moncky;1519595]Have a look at Linux from Scratch[/QUOTE] Just what I was going to suggest. [url]http://www.linuxfromscratch.org/[/url] | |
Re: [QUOTE=Rik from RCE;1516642]Have a look in the manual that came with your motherboard. That should tell you all you need to know about what CPU's it supports![/QUOTE] Or go to the MSI web site and check the board specifications. They should say exactly which processors they support. Personally, I prefer … | |
Re: So, you are trying to run the phone as a mobile "hot spot"? Does it support USB tethering? What mobile OS does the phone run? | |
Re: Sounds like the LCD back light is failing. Take it in to a repair depot. | |
Re: 2. You have an extra ')' at the end of the function declaration. The rest are likely a result of this error. | |
Re: Please, just post the code inside code blocks, as in [code] // This is C++ code [/code] Asking us to download data and then analyze it is inconvenient at best, and a vector for malware at worst. :-( | |
Re: Since you are in the C++ forum, I assume it is collaboration, as in CRC. Here is an article from the wikipedia about that: [url]http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card[/url] | |
Re: It has to do with the associations of application and file extensions. If you right click on the .exe file, open properties, and then click on the tool icon, you will get a form that shows what applications are associated with that extension. You can change, or move them up/down … | |
Re: I agree with thelamb that Stroustrup's book is more of a reference work. Well worth keeping on the shelf handy for quick sanity checking, or getting into stuff in depth - that's what I use my copy for, along with the Annotated Reference Manual (ARM). I've been programming in C++ … | |
Re: There may be such software, but I don't know what it is. You would need some software on the phone to make it act like a USB webcam for the computer OS, and depending what device it emulates, you may or may not need to install driver software on the … | |
| |
Re: There is the non-associated global operator ::new that returns a void* type, but there is (implicit) typed operator new for all data types. So, in your case, calling "new int" will indeed return an integer value, and "new int[10]", will return an array of 10 integers. | |
Re: Along with the memory requested (10 bytes in your example), there is also other allocation overhead such as so that the number of elements is recorded, so when you do this: delete [] a; The system knows how many elements to free. This is especially important when you allocate an … | |
Re: Usually I do this sort of string <-> enum mapping with an array. Example (using your stuff): [code] enum MyType{ Saw, Saw2, Saw3, mt_end }; const char* pMyType[] = { "saw", "saw2", "saw3" }; [/code] Now, you can use MyType as an index into the array pMyType. Assume the use … | |
Re: A polymorphic function: class SomeClass { public: int doSomething(void); int doSomeThing(int); int doSomething(AClass&); }; The member function doSomething(...) has three signatures in this instance, each with a different argument list. This is an example of polymorphic behavior where the type of thing (or things) you pass to the function determines … | |
Re: Get a start on this, and then maybe we can help you. Don't ask us to solve your class problems for you! :-( | |
Re: Memory mapped files: this allows you to write to a physical on-disc file as though you were writing to memory. Ie, the file is "mapped" to a memory location. Let's say you want to change the data 100 bytes into the file, replacing the contents with "hello world". Ok, assume … | |
Re: Simply enough, your code: typedef Car Element; is invalid since Element is already a defined type. What you are saying is that Car is Element. Is that what you really mean? Please clarify what you REALLY mean here. | |
Re: 1. Pointers are of a size to match the word size of the processor and operating system. A 32-bit OS will have 32-bit (4 byte) pointers, and a 64-bit OS will have 64-bit (8 byte) pointers. In the "old days" DEC 10 and 20 systems had 36 bit addresses some … | |
Re: Here is a link to the driver support site for HP and this printer in particular. Note that they do NOT support network printing for this model! Sorry, but I think you are stuck being tethered with a USB cable. However, you could plug in a wireless linux device the … | |
Re: Whether or not you can send an email to a phone and have it delivered as an SMS message would, I think, depend upon the carrier and the options the user has on their account. It is possible that they don't have SMS at all. I know that I don't … | |
Re: [QUOTE=Zeref;1496274]You have to extaract that file then compile from source. [CODE] tar -jxvf filename.tar.bz2 [/CODE] It will than create a folder in the same place you extracted it, once you in there you have to compile it [CODE] ./configure make make install [/CODE][/QUOTE] Generally correct, except for a couple of … | |
Re: Mike, you are giving away the recipe for the secret sauce! :-) Anyway, well stated! | |
Re: Change case to upper: toupper(int c) - loop through the string and apply this to each character. Change case to lower: tolower(int c) - ditto Reverse case: if isupper(int c) tolower(c), if islower(c) toupper(c) You figure out the details. | |
Re: What mike said is generally correct. However, it is also dangerous! Never dereference a pointer like this without first making sure it is not a valid pointer. This is why we have reference objects in C++ since it eliminates the need to check the pointer first. IE: [code] int int_function_1(int* … | |
Re: My advice is to throw the book away. Programming should start with basic data types (integers, floating point, characters, arrays, pointers), and then move into basic control structures (if/else, for/next, do/while), then functions. Each domain builds upon the one learned before, expanding your ability to use those concepts as you … | |
|
The End.