|
ok... "doesnt matter by opinion of what is over my head" i am wondering if there is any really good books that go over the following info:
~How to represent data
~data abstraction
~programming concepts
~Algerithms
~Searching, sorting - abstract data types
Titles of the books are great, links are cool, opinions are best "with titles "
Thanks for the help "and opinions"
~SilverShalkin
|
|
|
|
|
There are a lot of good books out there... i hope to read them someday
A couple that i feel helped me quite a bit:
The C Programming Language Brian
W. Kernighan and Dennis M. Ritchie
Starting Forth Leo Brodie
No the last one has nothing to do with C or C++. It is still a very good book.
--------
And we die young.
Faster we run. Alice in Chains, We Die Young
|
|
|
|
|
SilverShalkin wrote:
How to represent data
Surely the current trendy answer to that is XML
SilverShalkin wrote:
programming concepts
What do you mean ?
SilverShalkin wrote:
Algerithms
For both algorithms and data representation, you probably should start with a book on the STL, rather than reinvent the whell. I have an O'Reilly book called Mastering Algorithms in C that I am glad I read, but I won't do any of it, because the STL does it for me. The C++ Programming Language by Bjarne Stroustrup has a good intro to STL, otherwise, STL Tutorial and Reference from Addison Wesley is a good place to start.
SilverShalkin wrote:
Searching, sorting - abstract data types
Again, you should be using the STL, but Mastering algorithms in C is a good book to help you understand what it is doing for you.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
introduction to algorithms by thomas cormen et al is a seminal work imho
code complete by steve mcconnell is a must have as well
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
Thanks,... ill go and check them out...
Mastering Algorithms in c
Introduction to Algorithms
Code Complete
And read up on STL.
Thanks!
~SilverShalkin
|
|
|
|
|
There is a good book called C++ Plus Data Structures... it covers all of what you've asked about above but it doesn't go into massive detail.
SilverShalkin wrote:
~Algerithms
~Searching, sorting - abstract data types
Try the STL...
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
Writing Solid Code
Code Complete
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
I've created a managed C++ web service.
Whenever I try to 'run' it, it pops open an IE window, and instead of opening the file, it tries to download it.
If I click 'open', it the opens up the file in VS.NET. It is one line, reading:
<%@ WebService Class=StarKingdomsForceCalc.Class1 %>
Why is it doing this?
And what do I need to do to fix it?
I've tried uninstalling/reinstalling IIS, and rerunning the Windows Component Update... it seems like no matter HOW MANY times I run it, these three are always in the list:
Microsoft Frontpage 2000 Web Extensions Client
Setup Runtime Files
Microsoft .NET Framework
I've installed these repeatedly, but they always come up...
What can I do??
Thanks!
Adam Clauss
cabadam@tamu.edu
|
|
|
|
|
Hi, just a quick (and probably very stupid) question about mcisendstring...
I am using these commands to play an AVI file:
mciSendString("open c:\\test.avi" type avivideo alias testvid,NULL,0,NULL);
mciSendString("play testvid fullscreen",NULL,0,NULL);
It plays the video with sound, but the video is distorted and looks as though it is only 256-color rather than 16-bit or whatever - ie. it looks terrible. Is this to do with the palette, or dithering, or something? Is there a way I can change the settings so it plays properly?
I know this is probably a very basic question, but I would be very grateful if anybody could tell me what I'm doing wrong.
Many thanks,
Keith
|
|
|
|
|
Without seeing the video it's hard to say. My guess from reading your description of the error and looking at the code is that you have a video that was shot at a certain resolution and you're trying to display it in fullscreen and it's becoming distorted as a result. To test my theory, remove the fullscreen part of the command being sent to the second call of mciSendString. If the video shows up in a small window, but with a much better clarity then I'm right.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Hi, thanks a lot for your reply, but I don't think this is the problem. I have played the AVI full screen via Windows Media Player and other apps and it looks fine; it's not the resolution, but the colours. As though it's being forced into 8-bit mode or something like that. I've never used the mciSendString instructions before, so I don't know if you need to select better drivers or force it into 16-bit or something like that?
Again, thanks for any help.
All the best,
Keith
|
|
|
|
|
In that case, you might want to check out the MCIWndSetPalette function.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
How to capture the debug output of your system?
In short, I am trying to write something like DebugView (from
sysinternals.com) or TraceWin (Paul Delascia) kind of thing.
Any help will be appriciated.
Thx,
|
|
|
|
|
|
Hello,
I need to visualize a graph - simple nodes (rectangles or bitmaps) that are connected by an edge (line). It must be possible to move the nodes and the edges have to update to the new position of their target/Source node.
It's like an organization chart. How should I do that? Try to extend CListView? If so, how can I achieve that items in ICON Mode are moevable (as they are in the windows explorer)?
Any help apreciated!
Best regards,
Alexander
|
|
|
|
|
Hello, everyone!
I have a very complicated question (it seems to be one for me): I want to write a program in MFC (not ATL!) which behaves similar to the visual basic forms designer. I want to select different activex controls of my system, place them dynamically on a CView derived class and eventually want to embed vbscript to drive them. So i created a standard mdi application with activex support. Using the view class there is no problem to insert an activex control with CreateControl(...), it will be displayed and seems to be activated in-place, so far, so good. How can I disable/enable the control in the meaning of runtime / designtime mode? How to get events from the control? Up to now I was not able to find any description how to implement such a feature! There was something said about ambient properties, but how? Does anybody have an idea, how to do this?
|
|
|
|
|
Run-Time Check Failure #2 - Stack around the variable 'strReturn' was corrupted.
The following code bloack is giving me this error.
char *ProcessOBeginning(char *word, int *change)
{
char *Position = strpbrk(word,"oO");
if(Position)
if(isBeginning(Position,word))
{
if(isupper(Position[0]))
{
char strReturn[] = "O";
word = strcat(strReturn,word);
}
else
{
char strReturn[] = "o";
word = strcat(strReturn,word);
}
}
return word;
}
I think that it has todo with strReturn being allocated but I am not allowed to use memory management funcs for my project.
Steve
Not all who wander are lost...
|
|
|
|
|
With this piece of code:
char strReturn[] = "O";
you are only allocating one byte of memory for your string. The reason why you are getting the stack corrupt error is because you have the parameters backwards in your strcat function. I think that this is what you meant to do:
if(isupper(Position[0]))
{
char strReturn[] = "O";
strcat(word, strReturn);
}
else
{
char strReturn[] = "o";
strcat(word, strReturn);
}
The string that you want to append the data to goes in the first parameter of strcat. Also the value that is returned is the same pointer that is in word.
One more thing, you do not have to allocate a buffer for strReturn, you can simply do this:
strcat(word, "o");
Good Luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
actually I am trying to insert on o at the beginning, so the params aren't out of order. Is there something extra that I have to do? Thanks for the reply! How do you make those code blocks?
Steve
Not all who wander are lost...
|
|
|
|
|
First, in order to get the cool blocks of code type this:
<pre>
place your code here
</pre>
You can embed HTML in these statements.
If you want to put the "o" at the beginning of the string, then you were doing it somewhat correctly. But here is what you need to do to make it work properly.
if (strlen(word) < 253)
{
char szReturn[256];
strcpy(szReturn, "0");
strcat(szReturn, word);
strcpy(word, szReturn);
}
The reason that I check the length of word is to prevent a memory overrun because we are only allocating 256 bytes for the string.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks for all your help. I have a general question about stack corruption. I can't seem to find much information on it anywhere. Generally how is this caused? I think its because to much data is on the stack. Is this correct? How can I avoid this in the future? Thank you.
Steve
Not all who wander are lost...
|
|
|
|
|
Hi
The following information is in a .txt file. I nead to read through it, pick out certain parts and send the information to a DB.
Memory SM, location 1
Name: John Doe
Number: +12345
Memory SM, location 2
Name: Jane Doe
Number: +54321
Memory SM, location 3
Name: Jack Doe
Number: +112233
...
Here is the code I use to get the info I need from the first 3 lines:
/***********************************************/
FILE *stream;
stream = fopen( "number", "r" );
char bufLine1[30], bufLine2[30], bufLine3[30];
fgets(bufLine1, 30, stream);
fgets(bufLine2, 30, stream);
fgets(bufLine3, 30, stream);
fclose( stream );
char *pNext1 = &bufLine1 [21];
char *pNext2 = &bufLine2 [9];
char *pNext3 = &bufLine3 [11];
strcpy(bufLine1, pNext1);
strcpy(bufLine2, pNext2);
strcpy(bufLine3, pNext3);
//information sent to database
/***********************************************/
Is there a way that I can put this in a loop and then start reading the 4th, 5th & 6th line and send their details off to the DB. And the go on to the 7th, 8th & 9th etc? I persume it's something like a pointer in a text file but I'm not sure how to do this.
Thanks for any help.
Alan
|
|
|
|
|
Yes,
just don't close the stream and do a while(EOF)!
Cheers
Al
|
|
|
|
|
1. whether the length of bufLine1 is more than 22, if not,
the pointer(pNext1) maybe is out of control
2. you can use substr function
|
|
|
|
|
I made a VC6 freeware image file browser dedicated to Poser - the 3D character animator. The app works fine (about 5000 users) but I've got a W2K user with a strange problem. When he loads both my browser and Poser, Poser slow down. Each of the application alone work fine.
I just wonder if there is a tool or technic that could help me see what happens ? Any idea would be welcome, of course )
My browser is compiled under W98, I know the first thing to do is to recompile under W2K but I can't afford a new release untill late May. My purpose is to find the way to solve the problem so that next version is clean.
Thank you
Yarp
|
|
|
|
|