- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
13 Posted Topics
Re: The setday and nextday functions may be candidates for a switch. Which would be good because you can have it do something then in the default case if the user inputs something besides a char that corresponds to a day of the week. | |
What happens if you call openStream twice? I have this code in which I open up a weather xml page and get information out of it. Unfortunately, the way I do it has me doing a linear search down the page for the line I need each time I want … | |
I'm trying to create a custom dialog that acts much like th JOptionPane.showInputDialog() except it uses an asterisk as an echo character. So far, I've come up with the following. . . [code] class CustomInputDialog extends JDialog implements ActionListener { JLabel prompt; JPasswordField input; JButton ok; JDialog dialog; String word; … | |
First, I am running on linux and when i use the java command to run a program (i.e. java foo), it just sits after it finishes. how can I get it to fully close(specifically, the program I am posting at the end of this post) Second, is there an equivalent … | |
Re: I read the about tutorial but is there a way to open a file without the using namespace std; declaration? example: [code] #include<iostream> #include<fstream> int main() { std::fstream myFile("animals.txt",ios::app); if (! myFile) // Always test file open { std::cout << "Error opening output file\n"; return -1; } myFile << "Hello, … | |
Hello. I'm soon starting university as a CS major. From what I learned at orientation, my courses will be primarily in Java. However, I've spent quite some time learning C++. Is it likely that learning Java will completely confuse me while trying to learn C++ at the same time, and … | |
I can so far find Nothing whatsoever that will allow me to easily play a wav sound in a console app in linux. It's like I have to create my own audio player to play a half second clip of a cat meowing. Does anyone have any experience? I'd really … | |
Hey, I've been using linux forever and want to start dual booting slackware and BSD. I've heard that Slackware doesn't like this very much and was wondering if anyone has any experience with this type of setup? | |
Re: You can also after cin.clear() do this. . . std::string badchars; std::cin >> badchars; std::cout << "\"" << badchars << "\"" << " is not a character. Please try again."; put it in a loop and you can have the user try again. | |
Can someone explain this to me once and for all? I keep getting different answers everywhere I look. What is the correct way to separate the class declaration from it's member functions? The way I am doing it now is that the declaration and all of the member functions are … | |
i.e. . . [code] #include<iostream> void EatFrisky(Cat *Cat); int main() { Cat * Frisky = new Cat; EatFrisky(Frisky); return 0; } void EatFrisky(Cat *Cat) { delete Frisky; std::cout<<"Someone ate Frisky!\n"; } [/code] | |
I have this function in a Dog Class and for some reason, the age nearly always ends up being 77. I can't seem to tell what the problem is. Any ideas? [code] void Dog::setage() { while (1) { int age; std::cout << "Please Enter " << itsname << "'s age: … | |
Hello. I'm learning C++ out of Sams Teach Yourself C++ in 24 Hours and Accelerated C++ Practical Programming by Example. I've heard these are both good references. Anyway, I just learned about classes and I was wondering how one makes an array of class objects. here is the Cat class … |
The End.