Forum: C Apr 14th, 2006 |
| Replies: 7 Views: 1,846 Er, why would you protect shareware? Nowadays, I thought shareware was pretty extinct.
Back in the days of 14.4, there was a call for shareware since you'd be able to order it from a catalog, but... |
Forum: C Apr 7th, 2006 |
| Replies: 10 Views: 2,623 I'm fairly confident with making/destroying linked lists (one of my few strengths compared to other inexperienced coders), but I see what you mean.
For the first node you'd certainly use a method... |
Forum: C Apr 7th, 2006 |
| Replies: 10 Views: 2,623 In response to the deleted message:
True enough. You don't have to do node creation using
x->next = new <structname>;
I just prefer to do so here as an example, though my statement is a... |
Forum: C Apr 7th, 2006 |
| Replies: 10 Views: 2,623 That's right. Typically, a linked list is presented pictorally as a box with an arrow coming out of it pointing to another box with an arrow pointing out of it, which in turn points to yet another... |
Forum: C Apr 3rd, 2006 |
| Replies: 25 Views: 9,547 Grunge, it's better to start again and go with conventional methods that meet the standards of people such as Ancient Dragon.
ASCII stands for American Standard Code for Information Interchange.... |
Forum: C Apr 3rd, 2006 |
| Replies: 25 Views: 9,547 As Ancient Dragon says:
A computer only knows binary, because all memory storage in a computer is determined by the state of the bit being on or off.
It does not magically store 'A' or a ... |
Forum: C Mar 24th, 2006 |
| Replies: 4 Views: 1,474 This is just my opinion, but if what you're writing makes sense, don't worry about making control logic as compact as possible until you start having large numbers of cases.
I'd personally go with... |
Forum: C Mar 20th, 2006 |
| Replies: 13 Views: 7,435 As posted, it won't work.
It needs a semicolon after the uppercase function.
void main(){
char text[] = "TessSSttTTinGGG";
printf("output = %s", text );
uppercase(text)
printf("Output =... |
Forum: C Feb 10th, 2006 |
| Replies: 11 Views: 7,323 [Edit: Post removed due to misinterpretation of the question. Assumed pre-check was possible] |
Forum: C Sep 30th, 2005 |
| Replies: 3 Views: 1,141 sunny? Um... It's a copy/paste fix. |
Forum: C Sep 30th, 2005 |
| Replies: 7 Views: 2,528 Whoa, whoa, whoa.
This isn't a coding question after all? Okay, okay... Here's what you do.
Break it down into steps, one item at a time.
This makes the problem more managable and you can write... |
Forum: C Sep 29th, 2005 |
| Replies: 7 Views: 2,528 Post what you have, and people will help out. Otherwise, you may be asking us to do your homework for you, and we've got a rule against that.
Sorry.
As a hint, though: If you're working with... |
Forum: C Sep 29th, 2005 |
| Replies: 1 Views: 1,682 Take a look at this: It'll help you along.
http://www.daniweb.com/techtalkforums/announcement8-2.html
In other words, post code first, then we'll help.
Some tips:
Write down how you'd do this... |
Forum: C Sep 29th, 2005 |
| Replies: 7 Views: 1,629 No problem. Just keep in mind that writing a program is more than just correct syntax, it's also how you approach the problem.
That's why any number of professors and coders agree that the first... |
Forum: C Sep 28th, 2005 |
| Replies: 7 Views: 1,629 I've a little time.
Think of it like a gate. When it's open, you can pass inside the fence (the 'if' statement, in this case). When it's closed, you can't.
What the exceed_flag variable does is... |
Forum: C Sep 28th, 2005 |
| Replies: 7 Views: 1,629 No problem.
I'm sure there's another way (there usually are several ways to do anything in C/C++, but some of them are more correct than others), but I don't know enough to try getting fancier. |
Forum: C Sep 28th, 2005 |
| Replies: 7 Views: 1,629 If you want it to stop once the cost exceeds the price, use a break statement to exit the loop, or redefine your loop.
Break statement:
for (year = 1; year <= 15; year++)
{
cost =... |
Forum: C Sep 28th, 2005 |
| Replies: 5 Views: 2,777 Not at all. What you want to do is pretty simple, and should be easy to do.
So if you're using substring and such, is this SDK?
I did something similar to what you're doing (finding and making a... |
Forum: C Sep 28th, 2005 |
| Replies: 5 Views: 2,777 Am I to assume there's also a south, east, and west button? Why bother with the /\ at all, when you could position the buttons in a cardinal fashion?
The code for the button needs to be "/\\North". |
Forum: C Sep 28th, 2005 |
| Replies: 5 Views: 2,777 You need to use
index = OrigString->IndexOf('\\');
I believe. |
Forum: C Sep 28th, 2005 |
| Replies: 0 Views: 1,284 I'm almost done with my project, due in great part to the support and well-reasoned criticism here at Daniweb.
But there's one last little problem that's only hitting me in release mode.
In... |
Forum: C Sep 26th, 2005 |
| Replies: 7 Views: 1,947 Here's what seems to work, but I'm nervous about memory leaks.
In the header, I have the following declarations.
typedef pair <const CString,vector<int> > cCStr2IntVect;
vector... |
Forum: C Sep 26th, 2005 |
| Replies: 7 Views: 1,947 ...
That's horrifying. Thanks!
It seems to mostly be compiling. I'm doing the additions thusly:
strIter = Stringfilt.find(filterStr);
if(strIter!= Stringfilt.end())
{ |
Forum: C Sep 26th, 2005 |
| Replies: 7 Views: 1,947 Ah, that would be usable, considering the vectors would be for ints, and not require any fooling around with the operator overloads.
Nice.
But.. Um... Would that be a declaration like this?
... |
Forum: C Sep 26th, 2005 |
| Replies: 7 Views: 1,947 Oh. Well, that's not very good for this application, then... And it seems like my plan really was pretty dumb.
Can anyone suggest a better storage class for this problem?
Otherwise, I'll have... |
Forum: C Sep 26th, 2005 |
| Replies: 7 Views: 1,947 Hello.
I've just discovered that I didn't think a cunning plan all the way through.
I've got a grid with a bunch of columns and rows holding CStrings. What I'm doing is trying to filter the... |
Forum: C Sep 19th, 2005 |
| Replies: 6 Views: 2,245 You say that now, but it's really cool how you can grid out a logic equation and make it really efficient, or discover if it's not going to work... |
Forum: C Sep 19th, 2005 |
| Replies: 6 Views: 2,245 (a) PQ’ + Q’P + RST + R’ST + TR’S
P'Q+ST(R+R'+R')
PQ' and Q'P are equivalent expressions, and redunancy is discarded.
R+R' (R or not R) is always true, so:
PQ'+ST+R'ST
Additionally,
PQ' +... |
Forum: C Sep 16th, 2005 |
| Replies: 7 Views: 1,985 I'm a bit busy at work, so I don't have time to run through this completely.
So, what's the problem? The X's and O's don't show up at all?
Oh, and you may find this helpful to try:
char... |
Forum: C Sep 16th, 2005 |
| Replies: 7 Views: 1,985 By all means, post it inside code /code tags (Put square brackets, [ and ], around the code and /code, and paste your code between 'em...) |
Forum: C Sep 16th, 2005 |
| Replies: 7 Views: 1,985 So, uh... what's board's type? Int? Char? (I'd go with char) And you could probably address it a little more logically as a 2-dimensional array. |
Forum: C Sep 15th, 2005 |
| Replies: 5 Views: 8,123 This isn't a question of difficulty or possibility, it's a question of ethics.
What you're talking about, no matter what the purpose may be, sounds unethical at best, and illegal at worst. By the... |
Forum: C Sep 14th, 2005 |
| Replies: 2 Views: 1,070 I think you mean 'appended'.
If you want to overwrite a file, you could just use the default
ofstream myFile("SomeFileName");
and that will truncate the information in the file. |
Forum: C Sep 13th, 2005 |
| Replies: 4 Views: 1,377 Yes, but given the nearly unlimited uses for arrays/vectors, 1% of the time is still a lot... |
Forum: C Sep 13th, 2005 |
| Replies: 4 Views: 1,377 Isn't it more instructive to discuss things on this message board? |
Forum: C Sep 12th, 2005 |
| Replies: 3 Views: 2,387 Have you tried looking this up on wikipedia or anything?
And I don't think everyone will help. That'd be too redundant.
Anyhoo:
Procedure, I believe, is the arrangement of code into one long... |
Forum: C Sep 9th, 2005 |
| Replies: 5 Views: 3,062 That's certainly shorter in code length.
Should I use that method instead of the one I posted?
Since it works either way, is there a definite benefit in memory or speed, or are those concerns too... |
Forum: C Sep 9th, 2005 |
| Replies: 5 Views: 3,062 I found out that I'm really a twit at times. Hexidecimal means radix 16, not 8.
However, the solution I'm using goes like this:
CString line, temp; //Display and formatting strings,... |
Forum: C Sep 9th, 2005 |
| Replies: 5 Views: 3,062 I'm looking to break it into 12 and 34 such that when I place it into str1, it can be concatenated with += and a space, such that str1 would read as
12 34
Not two ascii symbols that evaluate as... |
Forum: C Sep 8th, 2005 |
| Replies: 5 Views: 3,062 I've been working on a char to hex converter all day, and it's working.
Except for one part.
I've got an unsigned short I want seperated into the two hex values. I've been beating on this... |