- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 21
- Posts with Upvotes
- 19
- Upvoting Members
- 11
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
134 Posted Topics
Re: Deleted.... post has been updated in the meantime. | |
Re: Well, you set n to zero on line 7 (n = 0;) and then you never change it so it's obviously still zero. Remember that == checks for equality. It does not set num to equal anything. Therefore, num==a; should be num = a; and then continue the same pattern … | |
Re: [QUOTE=niyasc;1085815]hei May I know how to handle dev cpp; It shows error even for simple programs which I had successfully run in turbo c 3.0[/QUOTE] Now I've never used turbo c before, but I have used Dev-C++ way back in the days when it was still under development. There are … | |
Re: I have a problem with this post. When I started reading the post I saw something to the effect of IE opening itself up hundreds of times. This does sound like a virus. However, the poster mentions multiple formats. This is a problem. A format deletes everything on the machine … | |
Re: Take a look into: [code]#include <iomanip>[/code] This allows you to manipulate your output. For example you can set the width of your output by using: cout << setw(8) << variable; Here the "variable" will be given a width of 8 characters. So, you can effectively make columns using setw(). You … | |
Re: You declare a variable with the name "rand" and then you try to call the function rand. It thinks you are trying to use the int variable as a function. Delete the rand variable or at least rename it and it works fine. | |
![]() | Re: I don't have this tablet PC, but I did do a Google search for you. Users are reporting that all is working fine with Ubuntu. One thing to keep in mind is that Ubuntu is distributed as a live CD so you can try it out before installing it just … |
Re: The information is right on their website. You need to use Windows to use this modem at the moment. There are no Linux drivers and there are no Mac drivers either. The problem, it appears, is that their hardware requires you to install a connection manager and right now the … | |
Re: Ancient Dragon actually made a very valid point. When things don't work in Linux it feels like you're banging your head against a brick wall. It's been my main OS for almost 10 years, but there are still things here and there that make me go absolutely crazy. It's funny … | |
Re: My 2 favorite IDEs for Java would be Eclipse and NetBeans. | |
Re: How about buggiest Linux distro of 2009. My vote goes to OpenSuse 11.1. They should just call it Linux ME. | |
Re: "gNewSense contains only free software. It's also the distro that Stallman himself uses--how can you beat that?" Those are two good reasons not to use it. Until free software works on my hardware and actually allows me to do what I need it to do it's a no go on … | |
Re: I'm being lazy so I'll just quote page 337 of "Thinking in C++": "As a matter of practice, if you think a value shouldn't change, you should make it a const. This not only provides insurance against inadvertent changes, it also allows the compiler to generate more efficient code by … | |
Re: [QUOTE=Nick Evan;1148451]wxDevCpp and Kdevelop don't as far as I know.[/QUOTE] wxDevCPP is just an extension of DevCPP which came with MingW. According to their website (on the FAQ page): "We use the MingW compiler that comes with Dev-C++." Which would seem to indicate that they are shipping with a rather … | |
Re: First thing I noticed was: [code] string filename = "names.txt"; // Create Var to hold file name inFile.open("name.txt"); [/code] Why are you creating a variable and then not using it? About your include "cmath", so far you don't really need it. Part 1 works fine. I was thinking that you … | |
Re: It's your copy constructor.... remove it and it will work. | |
Re: If I understand you correctly then you want to skip all the blank lines in your file. What you'll see with getline() is that it reads the next line in the input file regardless of whether it is full or blank. Therefore, you will get blank lines in your output. … | |
Re: You'll have to install whatever libraries provide you with these "missing" headers. They do not come with Visual Studio, nor do I believe they are a part of the C++ standard. itpp/itcomm.h appears to be part of the IT++ Communications library. Google the header files and you should be able … | |
Re: Part of this program doesn't make much sense to me. First, you have: double axx1; float xx1 = 0; Then you do some calculations and then: axx1=xx1; Converting from a float to a double doesn't do anything at all for you. If you want more precision then why don't you … | |
Re: [CODE] int t[10]; while(cin >> t[10]) [/CODE] Be careful. You declare an array of size 10. This will begin at t[0] and go up to t[9]. You're trying to put data into location t[10] which isn't part of the array. This may crash your program. What I assume you want … | |
Re: Well, the website indicates that: "IronPython is an implementation of the Python programming language running under .NET and Silverlight." So it's safe to say that it's not for Linux. Ubuntu installs Python by default so you'll already have it installed on your computer. | |
Re: [QUOTE=jimJohnson;1136963]if u wanna be a dick dont respond to my questions[/QUOTE] Actually what WaltP stated was correct. You're not calling any function that makes the computer wait 10 seconds. Instead of calling him names a more constructive approach would be to state that you realize that you're not calling a … | |
Re: According to the book "Thinking in C++" the second example is the "old" way of doing things while static_cast<> is the "new" way. So, the old way would be the kind of code you'd see in C while the static cast would be the C++ way of doing things. (From … | |
Re: "apt-get update" updates the list of available packages so your system knows what can actually be installed. Did the solution work for you? | |
Re: Ubuntu has OpenOffice installed by default. If you read the error it states that what you are trying to do: [B]Conflicts[/B] with the installed package 'openoffice.org-core'. This means that you are trying to install OpenOffice, but it's not letting you because you already have OpenOffice installed or at least part … | |
Re: I'm confused. Your question states that you want to count the number or "words" in a file, but your program is counting the number of "lines" in the file. Which one are you trying to accomplish? That getchar() is totally useless there because you've already gotten to the end of … | |
Re: What do you mean you have "no partition for /home but I have a partition for all my data files"? /home is where your data files go. It's the only place your personal data files go. swap: Looks fine. If you have plenty of ram you'll never use it. /: … | |
Re: How about SSH? You could always use something like Putty to provide you with an SSH client for XP. [URL="http://www.putty.org/"]http://www.putty.org/[/URL] | |
Re: sudo apt-get remove "packageName" or you could easily use of of the GUI tools to do it as well. If you want to know more about the options available in apt-get try: man apt-get and you'll get the manual page which lists the options for the package manager. | |
Re: Are you hiring? If so my hourly is $200 USD. Send me a check and I'll send you the code. If you think that we're going to do your homework for you just because you're too lazy to do it yourself it's not going to happen. Nobody is going to … | |
Re: [URL="http://rpmfusion.org/"]http://rpmfusion.org/[/URL] Actually your media player does support all the formats that are available, however, you need to install the codecs for non-free items like MP3. If you use the rpmfusion & livna repositories then you'll be able to install the non-free codecs to play anything from encrypted DVDs to all … | |
Re: [QUOTE=sadanand23;1083626]i have a doubt regarding this.... [CODE]int *pa =4 [/CODE] is considered unsafe isn't it?? so how does [CODE]int *p3=*p1+*p2[/CODE] work properly... ty in advance[/QUOTE] Well, I tried to get adding pointers to pointers working every which way I could and all but one ways resulted in a compile time … | |
Re: Operator overloading is used to make it easier to read/use an object. For example, you can overload the operator << so that you can print the value associated with an object rather than using an accessor function. Operator overloading also allows you to assign one object to another via the … | |
Re: 2 things: a) Like someone already stated, replace A a[] with A* a and it will compile and run just fine. b) Don't forget to delete *a in your destructor | |
Re: You have a few errors but I'll point you in the right direction. 1) As is you cannot use your function from main because it's defined after main but it wasn't declared before main ( so main doesn't see it). You can do one of two things to fix this: … | |
Re: You're not creating a 5x7 array. What you're doing is creating a 1x5 array. What you need is: int myArray[5][7]; Then you'll need 2 nested for loops to assign the numbers to the array. | |
Re: If you're deleting an array then I believe the syntax is delete []myArray. Here's an example that compiles.. [CODE] #include <iostream> using namespace std; class Object { public: Object() { cout << "Object::Object()\n"; } ~Object() { cout << "Object::~Object()\n"; } }; int main() { Object* o = new Object[5]; delete … | |
Re: [QUOTE=happymadman;1079613]YEah I thought that might be it. is there any way to make those map_width and map_height variables into constants under the private: thing? Thanks[/QUOTE] Sure, you can have constants in a class like so: static const int width = 100; Or if you just want some numbers to put … | |
Re: A character is a single character and not a string. 'a' is a character. 'Exit' is 4 characters 'E', 'x', 'i', 't'. I guess you can do 3 things. a) Compare 2 character arrays b) Use a string c) Use a single letter like, press 'E' to exit. | |
Re: It works just fine: [CODE] #include <iostream> using std::cout; using std::cin; int main() { bool again = true; do { cout << "Enter a digit between 0 & 1: "; int i; cin >> i; switch (i) { case (0): cout << "You chose 0\n"; again = false; break; case … | |
Re: So, what exactly do you need help with? I don't see any questions on your part nor do I see any code that you may need help with so I have no idea what you want from us. | |
Re: Programmersbook solution is exactly what you are looking for. Then you can use something like atof() to quickly change the string to a double if you need. Something like: [CODE] #include <iostream> #include <fstream> using namespace std; int main() { fstream file; file.open("Tbl_cliente.txt", ios::in); // open a file for input … | |
Re: [CODE] #include <iostream> using namespace std; int main(){ int size; cout << "How big is your array going to be?"; cin >> size; int* ptr = new int[size]; // Enter numbers into array. for(int i = 0; i < size; i++) { cout << "Enter Number: "; cin >> ptr[i]; … | |
Re: If you want it to be an array you can do what Clinton was doing minus the mistakes. Try this code, it compiles just fine under gcc [CODE] #include <iostream> using namespace std; int main() { int a = 1; double b = 2.0; char c = 'c'; string d … | |
Re: If you set the highest number to the first number, then why would you compare the first number to the highest to see if it's bigger? [code] high=num1 if (num1>high) high=num1; [/code] It's not wrong, it just doesn't make much sense. If the highest number so far is number 1 … | |
Re: Well, I'm using Windows and it gives me an error when I try to compile your program. Hence, no file is created because the program is never run. main MUST return an int in C++. As soon as you change void to int and run the program you will notice … | |
Re: printf("%10d%10d",x,A[x]); Don't you mean A[i]? | |
Re: Could you be any more general than that? | |
Re: Well, if your goal is to be a game programmer then my suggestion would be to start making games. I'm sure that every bookstore and most good libraries will have a whole section dedicated to game programming. Pick a good book up and start making games. My university has some … | |
Re: I don't understand what you're trying to do in the following line: inFile>>house[elements]; But if you're trying to read all the data from the file into the array using that one line then it's wrong. You need to use a loop to enter the data into each element of house … |
The End.