No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
18 Posted Topics
I have a simple class called DateTime because I'm doing some interface with a C# web service. I wanted to override the Date class' toString method as shown below in order to serialize it in a way C# understands, so I wrote a simple little wrapper class. The problem comes … | |
Re: Your problem is in your move functions. You have the members of the class x and y, then you have a local x and y in the move functions, and you aren't doing anything to distinguish the two. In reality, the member x and y should be enough. You should … | |
I'm running Arch Linux on an x86_64 system with a patched 2.6.33 kernel for bootsplashing, shouldn't affect what I'm doing. I'm trying to print out a number to the screen. I'm fairly new to assembly, and I don't really know my way around convention or other things to make it … | |
I recently learned a little bit about sorting algorithm efficiency. I looked at the merge sort and saw how it could be implemented using a scratch array to store the result until it was finished. It then talked about in place algorithms but didn't offer one for a merge sort, … | |
I'm running the latest distro of Kubuntu with KDE4.1. I recently installed the emacs text editor. At first everything worked just fine, and I started trying to do a few tweaks in my ~/.emacs file, but now every time I open emacs it opens the ~/.emacs file. If I open … | |
I am trying to overload operator++ for a type I have defined. Here' s a little explanation beforehand. I am working on a link_list class that can be used to create dynamic arrays of any type. I created a basic_link template to hold each element of the array. Each basic_link … | |
Re: The first thing you need to do is get the number of lines to print, using cin. First, create a variable to hold the number of lines, then read it in from the user. An example would be [CODE=c++]int count; cout << "What is the count?"; cin >> count;[/CODE] | |
I'm trying to create an template of an array class that encapsulates an array of a given type with several methods that are useful but nonstandard to regular c++ arrays. I have created a link struct to contain elements of the array and pointers to both the next and previous … | |
I have a feeling ya'll get plenty of cin questions here and are quit tired of them, but I have a few that are a little more in depth. I started trying to write my own input stream flush template and had some very minor successes when I found the … | |
I don't know if this is the right place, but my question is multi tier and I apologize in advance if this doesn't belong here. Anyway, I am looking at buying a new laptop for college. I am going to be studying Computer Science so I need something at least … | |
Ok, I was trying to write a program that formats a plain text file to the formatting standards of gamefaqs.com (no trailing spaces and no more than 79 characters per line). To my eyes, my code looks perfectly fine and effective. If I run it with anything but a file … | |
I have been teaching myself c++ for a little while now and came across something I couldn't figure out. I am trying to figure out how many char*s there are in a char**. In the current program I am using *argv[], so I can access it through argc, but is … | |
I am currently using Kubuntu 8.04. Although I do not know any bash, I altered the bash shell (via internet guides) to append history instead of truncating the history file. After editing the shell, the default way to clear the history only clears the interactive history and not the actual … | |
Re: As for the lowercasing, I have a function I created (with help from someone else) that could help you. First, you should try it for yourself though. If you can't I can give you the code. Try using a for loop that starts at 0 and goes to the length … | |
I have been doing c++ for somewhere between 1 1/2 and 3 months (I'm awful keeping up with time). I have a program (one of my first) that I have taken and added pieces to since I made it and it has come to be the piece of work it … | |
Re: Question : do you want your output in integer or double form? You are using doubles and integers and it is creating issues. | |
I am fairly new to C++, as I began learning it two days ago, with some very basic background in java and python. I was trying to write a code that could simply store, recall, and delete entries in a class I named address_book. I did it first without using … | |
Re: I had the same issues with one of my codes. I am no c++ expert so I cannot explain definite reasons but when I used getline() following the use of cin >> variable the getline was skipped, I found that the problem was fixed if I used all getline() functions … |
The End.