466 Posted Topics
Re: You're not going to get too far with a post like this. You need to be a bit more specific about what you want to know. For example, if you have some example code that you have written and don't know where go from there, then post that with you … ![]() | |
Re: I think that the major focus of this release of Ubuntu was "under-the-hood", as it were. The main improvement has been a fairly hefty improvement in boot times, battery life (on those devices that have batteries), better netbook support and a general consolidation of the system; tidying up of features, … | |
Re: If you're up to getting to grips with Qt, the [icode]QString[/icode] class has a comprehensive range of extra methods that don't feature in [icode]std::string[/icode]. One of these is [icode]split()[/icode]. The advantage of this method is that Qt's [icode]split()[/icode] function accepts all kinds of things, including regular expressions. It's a lot … | |
Re: I know that you're just starting out and doing these things as exercises, but if you want a simple and practical way to do this, then I'd use an STL vector instead of a C-style array. You need to have [icode]#include <vector>[/icode] and [icode]#include <algorithm>[/icode] at the top of your … | |
Hi, this might be a quick question, if anyone "just knows" the answers. I want to know a little about the differences between lists and vectors. For example, I think that the elements of a vector are stored in continuous blocks of memory (Maybe?) Are lists stored the same way, … | |
Re: What have you attempted already? If you haven't done anything yet, then you could start by using a strategy like reading in the file to a string and then change the element of the string that you want before outputting to a second file. Other than that, it's hard to … | |
Re: This seems like a good start to me. The bit for actually doing stuff is mostly about checking that the inputs are sensible. If you want to get input like you suggest, i.e. [icode]add 2 grey[/icode] then you should use [code=c++] getline(cin,my_string); [/code] and attempt to split the string on … | |
Re: on line 1 you have [code=cpp] char* temp=""; //Temp value to hold strings [/code] but, I think that you should assign this pointer to some memory before you use it, i.e. something like [code=cpp] char *temp = new char; [/code] Also, you have [code=cpp] dict.getline(str,20); hsh.insert(temp); [/code] but, you don't … | |
Re: I don't know about your floating point error, but you are wasting a bit of time here. Because of the way this equation for generating the gaussian mask works, the maximum will always be at i = 2, j = 2 (in the way that you have defined it). More … | |
Hi, Does anyone here have any experience of using libtiff in c++? I have been trying to do some simple image processing using it and I don't seem to be able to write images. I can make files that have roughly the right size, but they're not correct as they … | |
Re: Yep, the error is caused by the way that you have tried (admirably, but ultimately incorrectly) to catch people trying to use both upper and lower case. The solution given by Lerner should have solved this. The reason that it occurs is because by having the condition [inlinecode]if(temp == 'B' … | |
Re: There are a couple of good books that I used. "C++ how to program" by Deitel & Deitel is a good one that I used when I started out. It has lots and lots of code examples in it an should take someone from an also complete beginner to a … | |
Re: As stated by Ancient Dragon, the errors here are pretty well explained by the compiler. However, you appear to be learning from somewhere that uses some old syntax that's not best practice to use any more. I'll give you hints on those. a) You should avoid including standard c++ headers … | |
Hi there, I am trying to make a piece of code in C that: 1. opens a specified file, 2. Reads the data in the file and separates it into two arrays, based on the position of commas, 3. Converts the strings into doubles and then perfoms some manipulation on … | |
Re: > hi guys, i need to know the date conversion of, for example : seventeen june nineteenninetyfive You probably need to start a new thread for this, rather than hijack a seven-year-old thread. Make sure that you include more detail than you did above. Also make sure that you post … |
The End.