Forum: C++
May 24th, 2010, 10:32 PM
|
|
Replies: 5
Views: 245
|
Forum: C++
May 24th, 2010, 9:32 PM
|
|
Replies: 5
Views: 245
What STL data structure should I use?
Hi,
I am storing data in a class, but I am not sure how many objects I will be storing.
Currently, I am using a vector, but I was thinking this is less efficient because the program has to...
|
Forum: C++
Apr 28th, 2010, 2:54 PM
|
|
Replies: 12
Views: 518
Re: Intellisense Problem
Hi, I get the same message in VS2008 (express) when I try to open the same project in 2 different windows. VS2008 locks access to the .ncb file, but not the .sln so you can still open the project...
|
Forum: C++
Apr 28th, 2010, 2:51 PM
|
|
Replies: 13
Views: 687
|
Forum: C++
Apr 23rd, 2010, 9:17 PM
|
|
Replies: 2
Views: 233
|
Forum: C++
Mar 22nd, 2010, 3:40 PM
|
|
Replies: 4
Views: 173
|
Forum: C++
Mar 21st, 2010, 7:28 PM
|
|
Replies: 4
Views: 173
|
Forum: C++
Mar 21st, 2010, 4:55 PM
|
|
Replies: 4
Views: 173
Grant Acess to only protected, not private?
Hi,
I was wondering how I could grant a non-inherited class access to only the protected members of a certain class, but not the private members.
I am trying to write some code that would benefit a...
|
Forum: C++
Mar 16th, 2010, 12:31 AM
|
|
Replies: 19
Views: 873
|
Forum: C++
Mar 15th, 2010, 10:25 AM
|
|
Replies: 7
Views: 292
Re: Data caching for vector of bits vs bytes?
Thanks for the responses.
I guess 8 bits per pixel is faster because the loading time will probably be a very large factor (as I don't plan on accessing many pixels more than once).
|
Forum: C++
Mar 15th, 2010, 10:21 AM
|
|
Replies: 19
Views: 873
|
Forum: C++
Mar 15th, 2010, 12:29 AM
|
|
Replies: 19
Views: 873
Re: Random number always 41.
Here is my random solution:
#include <iostream>
#include <cstdlib>
#include <ctime>
int main()
{
srand(time(0));
int random_number = random();
cout << random_number << " is random!\n";
|
Forum: C++
Mar 14th, 2010, 12:05 PM
|
|
Replies: 7
Views: 292
Re: Data caching for vector of bits vs bytes?
Thanks, but I am not sure what you mean :confused:
The 8000 bytes/1000 bytes are just an example. Images can go well over 30MB each in memory and I plan to do batch processing, so yeah.
|
Forum: C++
Mar 13th, 2010, 9:04 PM
|
|
Replies: 7
Views: 292
Re: Data caching for vector of bits vs bytes?
Thanks for the response.
My concern is speed.
I kind of understand the part with the 2 operations, but I am not sure how data caching and memory processing work. I really don't how these things...
|
Forum: C++
Mar 13th, 2010, 7:01 PM
|
|
Replies: 7
Views: 292
Data caching for vector of bits vs bytes?
Hi,
I am wondering what is more efficient:
1. Sequentially determining the truth or false of each bit in a 1000 bytes (8000 bits) large char* string
2. Sequentially determining the truth or false of...
|
Forum: Coder's Corner Lounge
Feb 14th, 2010, 10:28 AM
|
|
Replies: 0
Views: 150
Virtualize using partitions?
Hi,
I want to use virtualize to have Windows XP, Windows 7, Windows Vista, and Ubuntu all on at the same time. Vista is the host operating system.
Can I make 4 different partitions and install each...
|
Forum: C++
Jan 17th, 2010, 3:51 PM
|
|
Replies: 10
Views: 420
|
Forum: C++
Jan 17th, 2010, 3:20 PM
|
|
Replies: 10
Views: 420
Re: #define inside structure?
First thanks for the information about enum, L7Sqr and Patrick.
Actually, I want speed optimization, so data can be written and read quickly from the structure. I was thinking that less bytes meant...
|
Forum: C++
Jan 17th, 2010, 2:50 PM
|
|
Replies: 10
Views: 420
Re: #define inside structure?
Thanks Patrick.
I will look into enum.
Will enum only use 1 byte if I put less than 256 values? Memory consumption is a possible concern for me.
|
Forum: C++
Jan 17th, 2010, 2:17 PM
|
|
Replies: 10
Views: 420
#define inside structure?
Hi,
I have been trying to do something like this:
struct person
{
#define paul 0
#define sam 1
#define patty 2
int name;
|
Forum: C++
Jan 11th, 2010, 4:40 PM
|
|
Replies: 1
Views: 156
|
Forum: C++
Jan 11th, 2010, 4:23 PM
|
|
Replies: 1
Views: 156
How do I use GraphicsMagick with C++?
Hi,
I want to use GraphicsMagick within a C++ program. For example, I load a .tiff file into a .bmp image class. I found http://www.imagemagick.org/Magick++/
I don't have it installed, but I am...
|