|
To whom it may concern,
I know people dont like to help out students. But I am a student and I the reason I am coming here to ask my question is not because I'm lazy, but because I dont know where to go to get the right information. For school, I was asked to write a database management system in C++, or in any other language of choice. I was wondering if anybody could tell me in what language it would be easier to write such system. And if so, how I could start, and if there is a helpful library that I could use to help myself, because I dont want to have to reinvent the wheel either! I would like some helpful information that helps me out to start out. Thanks everyone!!;P
GabyGirl
Ps. can anyone else give me ideas as to how to start. And... by reinventing the wheel, I mean, whether I have to design a way to store my records in arrays or something...
|
|
|
|
|
Try Visual Basic here:
http://www.freevbcode.com/listcode.asp?Category=4[^]
it is easier than C++ if you are a beginner.
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
...Good heavens!
|
|
|
|
|
I guess I dont understand what you meant by "reinvent the wheel". The whole exercise of writing DBMS is actually to do it from scratch so students will know the hurdles of writing good DBMS. Anyway, I believe C++ is good for you especially in doing DBMS, especially it will reinforce the OO programming that, believe me, you will actually use at workplace; at least in my company we do. If you want speed over good OO design, you can always go with C. To parse SQL, unfortunately you'll have to do C (using yacc and bison). The core engine can still be in C++ though. If you dont want to use SQL, you can always go with procedural calls too. I did a simple DBMS system with SQL interface for my last semester project using C++, group of 2. It wasnt that hard at all, kinda fun actually. Just go slowly but surely; dont expect you'll get Oracle out of it. Good luck!
|
|
|
|
|
Could someone explain to be how to figure out the size of something in bits?
example:
how many bits is
char buf[1024]
float buf[1024]
double buf[1024]
int buf[1024]
I know if I have the number of bits on each on then I can divide by 8 to get the number of bytes.
Do I have the idea or am I way off?
Sorry for the newbie question
steven
|
|
|
|
|
In terms of C++ and windows OS:
char -> 8 bits
float -> 32 bits (4 bytes)
double -> 64 bits (8 bytes)
int -> 32 bits (4 bytes)
Kuphryn
|
|
|
|
|
I understand that, but if the I wanted to know the size of
char [1024] would it be (8 * 1024)= 8192 bits and 1024 bytes?
steven
|
|
|
|
|
|
johnstonsk wrote:
I know if I have the number of bits on each on then I can divide by 8 to get the number of bytes.
If you know that bits ÷ 8 = bytes, then you must also know that bytes * 8 = bits.
|
|
|
|
|
Well, 8 bits is always a byte.
Generally speaking the number of bytes that a particular type uses can vary depending on the platform and the language. Some languages, like Java, define the size of specific types.
If you want to evaluate the number of bytes something is using then I suggest trying the sizeof[^] operator in C. Do a search on sizeof and you will find references for other languages such as the .NET framework.
--
"The money power of the country will endeavor to prolong its rule by preying upon the prejudices of the people until all wealth is concentrated in a few hands and the Republic destroyed."
-- Abraham Lincoln
|
|
|
|
|
Note that this:
char[3]
can take 32 bits (!) due to alignment.
On a 64 bit computer it should take 64 bits. so:
char[9] would use the space of 128 bits.
if you newed an array it would probably take even more space, due to the fact that the heap has to be managed in some way.
|
|
|
|
|
is it possible to open the audio in and audio out of the sound card at the same time and playback something that is different from the input to line in.
|
|
|
|
|
Yes and no (or... maybe).
Of course you can output audio that's different from what you get from audio in. However, to "playback something that is different from the input [to line in]" seems impossible unless you're willing to bring out the soldering iron.
|
|
|
|
|
Yes, just about every sound device these days support simultaneous record and playback.
There are two things:
1. You might have to record and playback at the same rate. Probably not, but best to play safe.
2. On the mixer control panel, make sure on the output mixer you disable 'Line in' or that will get mixed into the output.
Elaine
The tigress is here
|
|
|
|
|
I linked a file type with my program, such that if you double click on a file in explorer, it opens the file using my program. The only problem is if there's an instance of the program already open I want that instance to open the file rather than starting a new instance. (for example, if you double click a .doc file, you do not want start a new Word session if one is already open. Instead you want the existing word session to open the document).
Anyone have any ideas on the best way to do this?
John
|
|
|
|
|
While not a direct answer to your question, you can start with these two references:
http://www.naughter.com/sinstance.html
http://www.flounder.com/nomultiples.htm
|
|
|
|
|
We use the sinstance evrsion here at work. With a mod to the MMF structure such that if another instance starts up, it can copy the command line across into the object, send a registered message across to the other instance to tell it to open it and then kill itself. Works very well, just need to be careful about access to the MMF object. Need to avoid those race conditions, as you can open multiple docs at once in explorer.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
I am trying to modify the CListCtrl to match the visual design of the rest of my application. This means I need to change the look and feel of the CListCtrl.
I have successfully subclassed the CHeaderCtrl and made the column headers bitmaps using custom draw instead of that ugly grey button style.
Now I want to change the look of the scrollbars. Does anyone have an example of how to custom draw scrollbars in a CListCtrl? Either change the color, or replace them with bitmaps or anything.
I don't care if I have to owner draw it or custom draw it or use windows hooks. Does anyone have any sample code on how to do this or any insight on how I might go about doing thing?
Thanks in advance!
Greg
|
|
|
|
|
|
Does anyone know how to get the path to the system temp directory? Ive tried using GetTempPath but it returns the path to the currently logged on users temp directory. I need to get the system temp directory.
Thanks for the help,
Kevin
|
|
|
|
|
You are making a distinction between the two but shouldn't be. The fact that both happen to exist on some systems is pure coincidence.
char szPath[MAX_PATH];
if (GetTempPath(szPath, sizeof(szPath)) > 0)
{
if (_access(szPath, 0) == 0)
else
}
|
|
|
|
|
The problem that Im trying to solve is that I have a post-install app that sets various permissions on various directories for a particular user for when a server app (the one this post-install app helps install) runs. This post install app will most likely not be ran as the user that it it setting permissions for (the server user). So what I need to be able to do is get the temp directory, if it exists, for the server user that the server will run as, since the server will need this directory to write some temp files to. Is there a way to do this?
Thanks for your help.
|
|
|
|
|
kevdosh wrote:
So what I need to be able to do is get the temp directory, if it exists, for the server user that the server will run as...
I would suggest you write a little 5-line app (see my previous post), run it as the "server user," and note the result. I suspect it will either be C:\Documents and Settings\administrator or C:\Documents and Settings\Default User.
|
|
|
|
|
How about getting the windows directory and adding "\TEMP" to it (environment variable WINDIR) ?
A little crude but every Windows installation I've seen has this diectory.
Elaine
The tigress is here
|
|
|
|
|
Hi,
I am looking for a word phrase search algorithm in C++. In other words
I want to look for “Hello World” in a txt file or any other word combinations.
Any help would be greatly appreciated.
Ken
"I calculated the odds of this succeeding
versus the odds I was doing something incredibly
stupid...and I went ahead anyway." -Crow T. Robot
|
|
|
|
|
Why don't you look at basic_string::find from C++ Standard Library?
|
|
|
|