5,331 Posted Topics
Re: Plese post the entire compiler error output. However, line 18 is wrong. Instead of `cin>>a.foot<<a.inches<<endl;` try `cin>>a.foot>>a.inches;` | |
Re: Another possible approach may be to install the Windows Services For Unix, which as I recall includes an ssh server component. That may be better than trying to tunnel via Cygwin. | |
Re: It is also usual to put in guards to avoid including the file multiple times in order to avoid certain classes of compiler errors. Here is an example, call it myheader.h: // myheader.h #ifndef MYHEADER_H #define MYHEADER_H // Put header stuff here class MyClass { private: int m_intmember; public: MyClass() … | |
Re: I assume you are using a Linux or similar *nix type of oeprating system? So, look at the man page for the 'diff' command. It will do what you want. The purpose of the 'patch' command is to apply diff's to an original file. I believe that with the correct … | |
Re: The Mac supports the Unix/Linux CUPS printer drivers and configuration (.ppd files). There should be such stuff for the Dell. Go to their support page for this printer and search from there. | |
Re: C is a great language for low-level (close to the machine) code, but for more complex systems I prefer C++. You might appreciate this, that I consider Java to be C++ with training wheels! :-) That said, I have developed enterprise class systems with both C and C++ over a … | |
Re: There are certainly simulation tools written in C++, but these are very complex, and specialized, bits of software - not something you just go out and write in a day or three. As Mike_2k said, what kind of system do you want to simulate? If you can get into some … | |
Re: In function trapezio() you do not initialize the variable `To`, hence the result of `fabs((Tk-To)/To)` is NAN (Not A Number). The reason Mingw may have worked could be because it auto-initialized the automatic variables. | |
Re: RTFM? If you are doing this in Matlab, they have tonnes of tutorials and documentation that will describe how to do this. | |
Re: Time for a trip to the repair depot - it is likely that the system power controller is fubar. | |
Re: Ok. Teach me arabic and I might be able to help... :-) What encoding is used for the hex representation? Is it Unicode, or something else? | |
Re: You might want to provide some references and information about this algorithm, as many of us, even those of us with a lot of C++ and other systems experience, may not be familiar with it... :-) | |
Re: See item #3 in your list of instructions - modify an existing game. That seems to be the crux of the problem. Your professor appears to want that you take one of those single-player games and adapt it to a multi-player model. Sounds like a challenge! :-) He/she is trying … | |
Re: Not enough information and your attachment shows nothing helpful... :-( Remember that Qt is a C++ application library / IDE. It probably doesn't like non-ascii characters for symbol names (ascii values < 128). The locale settings probably don't have any effect, though I don't know for sure. My last work … | |
Re: Your example does not match what you said should be the pattern. > it must start in the center and then move to the right and then up and then to the left, making a spiral. Yet your example starts at the top and moves right and down, as in: … | |
Re: Alternatively int* Board::accessColCount() { return &colCountArray[0]; } Simply returning &colCountArray is an int** as the array name itself is a pointer, illustrated by Moschops' reply. | |
Re: Most systems these days have several "features" that slow down booting tremendously. One is the UEFI "secure boot" feature enabled by default on all Win8 systems. The other is all the "trialware" installed on the system - trial versions of a gazillion different tools you probably don't need or want. … | |
Re: With current distributions that use the RPM format there are better front-ends for installing packages so that dependencies will be properly accounted for and installed if necessary. For Red Hat distributions (RHEL and Fedora, Scientific Linux, CentOS, Oracle Linux) you would use the yum command (YUM == Yellowdog Update Manager). … | |
Re: Your first example has no doubles, just an int and a float. If you were to cast the 3.14 value to a double it would probably work, or use 3.14D. It may also work if you use 3.0 for the first argument. | |
Re: What operating system are you using? In effect, the short answer is yes. The long answer is "it depends". The video hardware you have (GPU graphics card) is also an important element. | |
Re: Quite a number of laptops are coming with Intel integrated video, as well as nVidia video adaptors, and switch between them (if you run Windows 7) seamlessly, depending upon what your video requirements may be. Myself, I disable the Intel video, since it takes up needed RAM resources (the nVidia … | |
Re: Generally, I agree 100% with JorgeM; however, to answer your question, there are a couple of factors to consider: 1. Boot loader 2. OS support for primary vs. extended partitions 3. Changes to OS where the boot loader is hosted Confused yet? :-) Windows can (or used to) only support … | |
Re: And get a good reference book, such as Bjarne Stroustrup's "The C++ Programming Language". The current version is the 4th edition - all 1200 pages... :-) Stroustrup is the author of C++, so if there is a better reference, I haven't found it! | |
Re: What all these good people said. In any case, your compiler should have emitted a warning that your were initializing a non-const string to a const char* "". DO NOT disable compiler warnings, unless you really know what you are doing! | |
Re: Sorry, but we don't do your homework for you. In any case, in your example where A::=XA/Y and B::=XB/Z, do you mean A = (X*A)/Y and B = (X*B)/Z? Or something else? | |
Re: Windows is the ONLY system (currently in common use) that uses backslashes for directory delimiters. It can also handle regular forward slash delimiters. The way any particular XML tool/library handles this is - well "indeterminate" comes to mind! Use forward slashes - which Windows can normally handle just fine, such … | |
Re: Get a router to handle the connection. It can use what is called NAT (Network Address Translation) to translate LAN (local network) addresses and allow all the computers connected to the LAN to access the internet without problems. You will need to configure your computers to use DHCP or (if … | |
Re: Take a class? Read a book? Ask a friend (anyone under 40)? | |
Re: Each may have proprietary op codes, but for the most part they are bit-compatible. They both support the x86 instruction set. As for which one is faster, the answer is that "it depends". There are a lot of factors other than CPU core speed that impact performance, such as cache … | |
Re: Do you want to change the environment variables for all users, or just your own account? Files that start with a dot are not visible. If you want to see them, run the command "ls -a ~". You should see all the files and directories, including the dotted ones, in … | |
Re: What web browser are you using? FWIW, both Firefox and Chrome have addons for blocking popups and ads (adblocker and adblocker+). Install those, and 98% of the ads will be blocked and this problem should go away. | |
Re: Aws pritaeas said, use the GitHub search function. You may also want to visit sourceforge.net and use their very useful search tool as well. | |
Re: The & operator returns the address of the item it is applied to. It should be used with care as it can return an address that you don't expect under some circumstances. In any case, please provide a case of where you think you need to use it and we … | |
Re: Generally, what JorgeM said is correct. However, for simple LAN configurations it can be pretty much PnP (Plug and Play). IE: Internet <-> Router (dhcp server) <-> switch <-> computers This assumes that the computers are all configured to use dhcp to get network addresses (normal default). Issues arrise when … | |
Re: We don't do your homework for you. Try first and we can critique your efforts. Quick PS for this, to get you started. 1. Get input number. 2. If < 0 emit error and exit 3. If >= 0 see if is prime number. 4. If prime, huzza! 5. Else … | |
Re: Think of it like this: 1. School has list of students and **courses**. Each is unique to the school. 2. Each course has a number of classes, uniquely identified by time and teacher (you can have multiple classes for the same course at the same time, but not the same … | |
Re: If you are using Linux for an OS, the man pages are terribly helpful, such as "man rand". If you aren't running Linux, then you can search the web. In this case, the google search terms "man rand" will point you to a page (many pages) with the same information, … | |
Re: for (int row = 0; row < max_rows; row++) { for (int col = 0; col < max_cols; col++) { // do something at row/col } } This may make the logic more accessible. | |
Re: Lucaci is being nice. We don't do your homework for you. At least he was willing to give you a link to a relevant web site. Now, you have to figure out how to code it! Once you do that, we MAY be willing to help you sort out the … | |
Re: As AD said, but to elaborate - there are a number of C++ GUI tool kits that you can use, some of which are nicely multi-platform (Windows/Unix/Linux) and only require a recompile to run on any of them. The GUI tool kits that I see most often for this are … | |
Re: Modern systems can decrement a 10K value in about 10 nanoseconds. This is not the approach you want to take. There are system timers that will handle timers in nanosecond scales quite nicely. Is this a Java application? | |
Re: One sentence - check your firewall QOS (quality of service) rules. | |
Re: Also, can you use standard template library collection classes, such as std::vector<T>? Or do you need to support your own collection classes/functions/methods? | |
Re: The pointer 'p' references a stack-based (automatic) variable. It cannot be deleted. As mentioned, only items that are created with operator new can be deleted. This can be a painful lesson to learn as it is a quick path to a core dump. That said, an advanced C++ technique to … | |
Re: Create the mysql table with a unique primary key. Duplicates will be automatically rejected with a 1062 SQL error code. I use that technique to handle duplicate rejects when storing performance log records in our data centers. It is more efficient than searching for a duplicate, and avoids the overhead … | |
Re: There are 2 wires each for tx and rx because the hardware uses what are called line-drivers to move the signal. This minimizes interference and increases distance for the transmitted signals and greatly increases the reliability of the media. FWIW, you CAN transmit and receive at the same time, if … | |
Re: Please don't ask us to do your homework for you, and if it isn't homework/school work, but real work, there are well-known algorithms on the Internet that will help you. Try some Google and Wikipedia searches. | |
Re: This may help: http://howto.cnet.com/8301-11310_39-57319379-285/how-to-read-epub-files-on-your-kindle/ | |
Re: JorgeM's points are well taken. That said (and I know it isn't too feasible these days), the only 100% (more or less) sure way to avoid hacking is to stay disconnected from the Internet... :-) Firewalls, NAT's, A/V, malware scanners, rootkit scanners, and keeping a close eye on attachments you … |
The End.