hello
I'm starting a project that will need either RAW wave playback/recording and MIDI playback
And I want to keep it platform independent
I've already took a look at SDL_mixer and OpenAL which...
Type: Posts; User: carlorfeo
hello
I'm starting a project that will need either RAW wave playback/recording and MIDI playback
And I want to keep it platform independent
I've already took a look at SDL_mixer and OpenAL which...
I've made some tests: IMO returning by reference seems to be the best choice.
SomeClass & getData()
{
return * new SomeClass();
}
int main()
{
Doesn't seem that weird then :)
True
please do not remove your codes the next time.
This post has been useful for you but it's useless for others which would have learn from your mistake instead.
gonna take a look, thanks Daved
hello
Is there any platform independent library that allows me to get the content of a folder, or anyway to do any common stuff with the file system?
thanks
if((string)char_numType == "UNDERGRAD")
It doesn't look right but it works. What would be bad with that?
ok, great
thank you :)
thanks laserlight, it works fine now.
Although I missed the fact that I don't really need to use the function Data() inside the class, I just could read data directly.
May you explain what...
hello
I'm learning how to use operators:
this code compiles and works fine.
struct Item {
int data;
Item (const int value = 0) { data = value; }
I've personally never used something like while (cin)
I guess it just checks whether the object cin exists.
about good() :
http://www.cplusplus.com/reference/iostream/ios/good.html
about...
well Swerve, I'm glad you've reached the solution finally.
But there is still one important thing you are missing:
if(in_stream.fail())//checks the file could be opened.
{
...
hi Swerve
1:
I'd suggest you to use better names for your variables/structures
(avoid using "my" everywhere since it makes the code less readable).
example:
struct Item {
char...
We can help you of course, but we need a point to start from.
Do you have any idea of how to get the solution? Did you write some code?
The first move is up to you.
Thanks
anyway:
http://www.boost.org/more/getting_started/index.html
IMO wikipedia is always a good point to start
http://en.wikipedia.org/wiki/Boost_C%2B%2B_Libraries
Ohh, I've just got that "*" is an operator... it's solved.
Sorry for the useless thread
hello
I've tried to read headers related to STL iterators, but they're too hard for my quite low knowledge of C++.
That's what I am wondering about:
deferencing an iterator gives me the value it...
true, it's a lazy-ish practice
If you have no idea we cannot help you.
Try to get one, write it and we will tell you how to improve it.
hi elsheepo
I am using Kdevelop and I'm working very fine with that tool.
Anyway I'd suggest you to practice with gcc using the terminal before, expecially if you write simple programs.
Kdevelop...
a hint for you:
the following will work fine:
double calcint(double amount, double rate)
{
return amount * rate * 1;
}
vart...
it's a demonstration of his code indented. I didn't care about the code itself
finally, this is your code + indentation:
doesn't it look more readable? (for you and for us)
int main()
{
ifstream(liscense);
liscense.open("regfile.txt");
while(!liscense.eof())
I've made a mistake in my examples: the array declaration inside the main function.
My program creates that temporary array inside a function, so it doesn't need to be resized: I don't need it...