466 Posted Topics

Member Avatar for sangha6
Re: cpp

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 …

Member Avatar for iamthwee
0
99
Member Avatar for khess

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, …

Member Avatar for Scott82
-1
442
Member Avatar for AssaultM16

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 …

Member Avatar for AssaultM16
0
157
Member Avatar for xiikryssiix

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 …

Member Avatar for xiikryssiix
0
194
Member Avatar for ravenous

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, …

Member Avatar for ravenous
0
107
Member Avatar for Lord_Polo

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 …

Member Avatar for Lord_Polo
0
113
Member Avatar for Bastler

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 …

Member Avatar for ravenous
0
82
Member Avatar for matt611

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 …

Member Avatar for ravenous
0
123
Member Avatar for Knad

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 …

Member Avatar for Knad
0
292
Member Avatar for ravenous

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 …

Member Avatar for ravenous
0
5K
Member Avatar for ArrogantLegend
Member Avatar for malathuis

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' …

Member Avatar for ravenous
0
60
Member Avatar for vigneshvh

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 …

Member Avatar for ithelp
0
106
Member Avatar for Ahmed Padela

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 …

Member Avatar for Ancient Dragon
0
71
Member Avatar for ravenous

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 …

Member Avatar for WaltP
0
1K
Member Avatar for stupidenator

> 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 …

Member Avatar for stupidenator
0
222

The End.