6,741 Posted Topics
Re: >void main() I'll just get this out of the way. void main is incorrect. The correct definition of main is [INLINECODE]int main()[/INLINECODE]. >The syntax for templates is >template < class T > >and not >template < typename T > Both are correct. As a template parameter, class and typename have … | |
Re: >1) What are the prospects for a female in this field and will her age be a hinderance, meaning to old to start? Age and gender are irrelevant. The big killer will be her lack of mathematics skills. While some programmers can get away with basic arithmetic, programming is inherently … ![]() | |
Re: >BubbleSort( &Array[ArraySize] , ArraySize); If the variable is declared the same as the parameter, you need only pass the variable name. The only time you need to play around with addresses or indirection in a function call is when you have a complex type and need a subset of that … | |
Re: >I need to know where to get a copy of bios.h(and any files that are used with it.) They'll likely be worthless to you unless they came with your compiler to begin with. >and the opengl header files. Those headers come with the [url=http://www.opengl.org/]OpenGL library[/url]. All you need to do … | |
Re: You shouldn't worry too much about efficiency yet. Just work on getting it functional. :) As for the functional part, pulling HTML tags from a file can be tricky for the general case. Probably the safest way is to walk through every character and build each tag individually before storing … | |
Re: Okay, it looks like you're confusing C, C++ and Java. >#include <string.h> This supports string handling on array based strings, not the string class. For that you want to include <string>. I know it's confusing, but sadly, that's how it is. :( >boolean Ispalindrome() boolean isn't a keyword in C++. … | |
Re: >If I create a class called "tree" and inherit from it to classes >called "elm" and "oak", can I, using all three header files, create a >vector <tree> and use push_back to add an "elm" and an "oak" to that vector? Polymorphism only works through references, so you'll want a … | |
Re: ^ isn't restricted, it just means something other than what you're trying to do. ^ is the bitwise exclusive OR operator, not an exponentiation operator. What you want is the pow function: [code] #include <math.h> pow ( 2, 3.0 ); [/code] | |
Re: It takes two to tango, slick. Keep that in mind when you hold grudges. | |
| |
Re: >I tried to run this and it wont run. It looks largely okay, can you describe how it doesn't run? | |
![]() | Re: This thread is over a year old. Please look at the time of the last post before replying, as resurrecting old threads is often counter-productive. Thanks. |
Re: >Any ideas you guys could fish out would be most helpful. Lazy deletion is definitely the easiest to implement, but it gets tricky when you want to clean the data structure by physically removing "deleted" nodes. So it really just defers the problem until later, where it becomes a bigger … | |
Re: >c? I suppose that would work, though the wording looks tricky. >c? You're so indecisive. One of them is right, so you can improve your chances to 50/50. :) >c? A pedantic view would say d for none of the above. >d? That's right, after a fashion, but you could … | |
Re: This is an introductions form. You'll have more luck attracting experts who can help you troubleshoot your problem in the correct forum. [url=http://www.daniweb.com/techtalkforums/forum99.html]This forum[/url] would be a good start. | |
Re: >I've got a "Segmentation Fault" error in C++ when trying to allocate a vector with a dimension of 2 million. 2 million what? Chances are good you're exceeding the limits of a single allocation request. But it's hard to say without seeing some code. | |
Re: >For example name of contact, instead of typing the whole name I only >want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm. I can think of a few ways to do this. The first is autocomplete where you keep track of the characters being entered, search for the … | |
Re: The point of the questions is for you to do the analysis and come up with an answer. Any loser can find the answer by exhaustively searching for it online (well, maybe not [b]any[/b] loser ;)); a promising computer scientist, as I'm sure you are, isn't afraid to figure it … | |
Re: It works fine for me, though I doubt that they only have one server for the entire world to use. ;) | |
Re: >1) Do big-oh and theta both represent the worstcase for the running time? They represent whatever case you're analyzing. >2) How do I know when to use theta? Theta is when you can achieve it. It's a much stronger claim than Big O because it's a tighter bound. | |
This is just a suggestion for a convenience feature. It would be nice if we could collapse the forum categories that we don't use. For instance, I visit the Software Development forums and the Coffee House forums, but rarely anything else. I find myself having to do a lot of … | |
Re: Please don't post your homework. We're happy to help with homework, but we won't do it for you. So we ask that you show you've made an honest attempt at solving the problems. | |
Re: >Does it matter? Not really, as long as you're consistent and document the functions. | |
Re: >I feel I was not understood again, propably my fault. Don't worry about it. Pointers to members aren't exactly a commonly used feature. The problem in your initial code is a type mismatch. x is an array, but to get a pointer to it, you need a pointer to an … | |
Re: Hehe. "I am important MICROSOFT person!". :lol: [Edit: Yes! IntelliTXT picked up Microsoft! Ahahahaha!] | |
Re: >can anyone tell me if what i have is correct or almost correct Not to hurt your feelings, but it's not even remotely close. This is a case where I'll recommend that you sit down with your teacher and get some face to face help. It would save us both … | |
Re: >'d like to know how I can use either string or char to get the user to input 15 or less characters You can't portably do this. It requires a finer control of the input device than standard C++ supports. However, if you simply want to read lines and truncate … | |
Re: >I've also tried with fputs but the results were the same... The problem isn't with your output, it's with your input. fgets stores the newline character. Because only the last line isn't terminated with a newline, it's the only line that prints correctly. Try this: [code] #include <stdio.h> #include <string.h> … | |
Re: >Could someone please tell me how Sparse Matrix structure is different from a List? A sparse matrix is like a two dimensional list that doesn't waste space on empty cells. | |
Re: >Is it better to just to individually declare the members of std to be used in >a program, or is the global declaration "using namespace std" being >unjustly maligned as a "global polluter". Yes and no, respectively, but with one caveat. The big problem comes from dealing with the global … | |
Re: >What would you do in such a case? It depends on how far you want to go. If you simply don't want to be associated with the project, you can turn it down at the risk of losing your job. If you feel the project should be cancelled, you can … | |
| |
Re: Borland doesn't do Visual C++. Perhaps you mean a graphical interface using C++? Using correct terminology is more helpful because we can actually help you instead of sitting around trying to figure out what the hell you're asking for. | |
Re: >I'm thinking that the learning curve for this stuff is a lot higher than I expected That's very likely. >I feel like I should be able to just jump right in After a couple of years of learning you can jump right in and still be overwhelmed. There's really no … | |
Re: >I was wondering if there a problem with the way it was written Aside from being copied verbatim from a book that is well known for its awful code (poorly written in C via Pascal), there's nothing wrong with the code except for the first loop should do a conditional … | |
Re: uzone24, one reason I haven't moderated your post is because the original question was posed several months ago. But we don't give answers to homework without effort on the student's part. The other reason is because your code both sucks and is horribly broken, so if someone bothered to turn … | |
Re: >he taught Linus Torvalds Indirectly through his book perhaps, but Linus was never a student of Tanenbaum. | |
Re: When I took the exam it was full of trick questions and language subtleties. As long as you keep in mind that the obvious answer probably isn't correct, you should be okay. ;) | |
Re: >So, why are they getting such bad press? That's news to me. All the press I've seen or participated in has been good. Do you have links to this "bad press"? >Women programmers are much too few and far between. Are you saying this because there's a legitimate and measurable … | |
Re: It was automatically dumped in my Junk Email folder. I kind of left it there... | |
Re: >i want complete tutorials online Wow, you're picky. The problem with assembly language is the massive amount of prerequisite knowledge that you need for things to make sense. Unfortunately, assembly resources are few and far between. Here are are a few. [url]http://www.drpaulcarter.com/pcasm/[/url] This uses NASM and keeps things relatively simple. … | |
This really is just a whine, because I don't have a viable alternative to suggest at the moment. The big banner adds cause a noticeable slowdown when loading every page on Daniweb, and sometimes after the page has loaded when trying to scroll. I say noticeable because not only can … | |
Re: >you might be interested in using the Visual Studio Express Edition products. I only have one question: How much is Microsoft paying you to promote their stuff on random forums? | |
Re: >if (gallons == a - z || A - Z){ There are several things wrong with this. First, you're testing the value of characters, so you need to be surrounding them with single quotes. Next, you need to recompare with every part of the expression. C isn't polite enough to … | |
Re: >I'm completely new to C++, and my teacher gave us a card game to do for our first assignment. One of these statements is a lie. | |
Re: >the compiler says the functions I am using are deprecated My copy of the standard says no such thing. This is one case where it's okay to use a pragma to make the compiler shut the hell up. | |
Re: >printf("%c", len_char); //<----this does not print anything too!! What did you expect it to print? You realize that the %c format modifier takes the integer value you supply and prints the character representation of that integer, right? In other words, it's not going to print '3'...ever. As long as the … | |
Re: This has nothing to do with C or C++. Please direct your question to a Linux forum. |
The End.