6,741 Posted Topics
Re: >fingerprint verififcation system with minutiae matching, function include threshold, thinning, and ridge detect Bwahahahahaha! >can any1 help and giving sample code?? What kind of print capturing device are you using? Is it optical or solid state? Is it even a real-time scanner? What about image recognition of old ink based … | |
Re: >Hi I'm Josh Hi, Josh, I'm Julienne. >Hashing error LNK2019: unresolved external symbol "public: __thiscall >hashTable<class employeeType>::~hashTable<class employeeType>(void)" >(??1?$hashTable@VemployeeType@@@@QAE@XZ) referenced in function _main > >Hashing error LNK2019: unresolved external symbol "public: __thiscall >hashTable<class employeeType>::hashTable<class employeeType>(class employeeType const &,int)" >(??0?$hashTable@VemployeeType@@@@QAE@ABVemployeeType@@H@Z) referenced in function _main You've implemented the constructors and destructor, so … | |
Re: I don't download attachments. If your code is relatively short, post it. Anyway, what are you having problems with? Do you know how to derive from a base class? You're not really giving us much to work with here. | |
Re: >My probelm occurs for large uneven matrices where I end up getting a segmentation fault. By default, Visual C++ 6 doesn't throw an exception when new fails, it returns a null pointer just like malloc. Your problem looks suspiciously like one of the allocations is failing and then you try … | |
Re: Before I make suggestions, I'll give you a cool version: [code] #include <algorithm> #include <iostream> #include <map> #include <utility> #include <string> using namespace std; map<char, int> get_frequency ( const string& s ); void show ( const pair<char, int>& freq_item ); int main() { string s; cout<<"Enter a string: "; if … | |
Re: That's C, not Java. And the code is far from complete, can you give more detail? | |
Re: >but I'm sure I would have saved a lot of time by debugging the program instead. Sometimes debugging is more efficient and cost effective, but sometimes the bug is just too engrained and a rewrite is in order. >I would really like to learn how to debug my programs. Start … | |
Re: >Does neone have any design ideas? What is there to design? Read a string, check the first character, and print the appropriate message using an if statement and logical AND. | |
Re: Please don't post multiple threads with the same question. | |
Re: >Could someone explain how to Fake it with ASCII art, use a graphical API, or just print "sqrt", people can figure that one out fairly easily. | |
Re: Start by remembering that C++ is case sensitive. Then make sure that every variable you use is defined before it's used. | |
Re: >I just want to know if theres any way i can read an input twice from the console. The only portable way is to ask the user for the same input again. Once you read data from stdin, it's gone unless you saved it. Another option (you can decide if … | |
Re: Okay, what part are you having trouble with? Keep in mind that if you say you haven't done anything yet, I'll tell you to get lost. If you have done something, you'll need to prove it. Why? Because this is obviously homework, it's obviously easy if you put in a … | |
Re: Break down your code until it's as small as possible while still exhibiting the error, then post it here. Most of us won't bother to download attachments just to help you, it takes too much effort when we can't tell right away if it will be worth it. | |
Re: Easy greasy: [code] #include <iomanip> #include <iostream> using std::cout; using std::cin; using std::setw; using std::endl; int main() { int limit; cout<<"Limit: "; if ( cin>> limit ) { cout.fill ( '$' ); for ( int i = 1; i <= limit; i++ ) cout<< setw ( i ) << limit … | |
Re: >Seg Fault Check your array indices. Use a debugger, or sprinkle the code liberally with debug prints statements. If you don't even know the general area that the segmentation fault is coming from then you aren't debugging properly, and debugging is a huge part of programming so you'd better start … | |
Re: Nobody is going to do your homework for you, but pasting the assignment without any of your own words is even worse. | |
Re: Okay...what is it doing that you don't want? As much as I enjoy working with algorithms and data structures, debugging somebody else's quicksort usually isn't enjoyable. Your recursive calls are correct, so the problem is in the partitioning. I see several potential problems, but the best way for you to … | |
Re: >They seem to have limited courses and their professors seem incompetent Sadly, this is a common situation. You would be better off choosing a school for the degree that it gives you rather than what you can learn. Then you can teach yourself what you need to know. In my … | |
Re: Java is not the same as Javascript and your problem is not a programming issue that you can fix. Try another forum. | |
Re: >know one responded, so i figured i will ask again You figured wrong. Asking again is rude. Asking again in a new thread is even worse. >why i can't print out a rectangle, triangle and diamond The evidence suggests that you're lazy. Here's a hint: Use nested loops so that … | |
Re: >Im in c-programming and i have no idea what i am doing We've all been there, just push your way through and things will start making sense eventually. >i don't understand my teacher. Why? Is it a communication issue where you literally can't understand your teacher? If not then try … | |
Re: >however would this way return something like '4.5678?' No, integers can't hold a precision, so everything past the radix is truncated. You would have 4. But you would also have known this if you had bothered to try it before asking this question. | |
Re: >i dont know exactly why constructors are being used Not using a constructor is akin to a restaurant giving you a glass without the drink. In the simplest manner, constructors guarantee that your object is created with predictable data for the methods to work with. | |
Re: Don't bump a five month old thread! | |
Re: What compiler and platform? | |
Re: >Below is my program pliz help me to get rid of thge errors When you're getting errors, post them. I'm not going to cut and paste your code, compile it, and debug it just for you. That's a lot of work for very little gain. | |
Re: >Am I just talking nonsense? Nope, those are all very good questions. >do I just construct them as you would a binary tree? Most likely not if what you're used to are binary [b]search[/b] trees. The strict ordering of less than/greater than is what makes binary search trees work, and … | |
Re: >heres a problem for u We don't do homework, and the "Here's a nifty problem for you, but be sure to post it so that I can steal it for my class" trick is a common one. | |
Re: >The error I keep on getting is bin_search local funtion defs are illegal. You should listen to that error. It's telling you that you can't have a function definition nested inside of another function definition. bin_search is defined inside main, so that's illegal. What about report, you say? It's inside … | |
Re: >look on the ASCII table for vowels No, this encourages bad practice. Not all implementations use the ASCII character set, so the trick of subtracting 'A' from 'a' or 'a' from 'A' is nonportable and thus, not recommended. Especially for one new to the language. >I do not have the … | |
Re: >I'm wondering if there's any sort of interpolating function in C. There's probably one somewhere written in C, but the language definition doesn't support it. | |
Re: It depends on how your classes are designed. Can you use inheritance or packages to allow access? Otherwise you're either going to be hosed, or you have to make the members public. | |
Re: Using C-style strings: [code] #include <iostream> #include <fstream> #include <cstdio> ... char filename[FILENAME_MAX]; cout<<"Enter a filename to save to: "; cin.getline ( filename, sizeof filename ); ofstream output ( filename ); [/code] Using std::strings: [code] #include <iostream> #include <fstream> #include <string> ... string filename; cout<<"Enter a filename to save to: … | |
Re: >It didn't work. Then you didn't do it right. Try again and don't post the same question in a new thread again. If it still doesn't work, tell us [b]exactly[/b] how it doesn't work as opposed to how you think it should work. | |
Re: >Can't I use "strcmp" like this? Not if Training[0][0] is a character. strcmp compares strings, and a character is not a string. Use == instead: [code] if ( Training[0][0] == '1' ) [/code] Alternatively you could use strncmp to compare a subset of the string, then use the address-of operator … | |
Re: You wanted something like this perhaps? [code] public class MortgageArray { public static void main (String[] args) throws Exception { double[][] mortgage = { {200000, 7, 5.35, 0.0}, {200000, 15, 5.5, 0.0}, {200000, 30, 5.75, 0.0} }; System.out.println ("Mortgage amount is \t" + mortgage[0][0]); System.out.println ("Term of mortgage is \t" … | |
Re: Walk along the string, but keep a boolean variable that's true if the last character was whitespace and false otherwise. Whenever you reach a non-whitespace character and the boolean variable is true, change the character to upper case. You don't need to worry about testing if it's already upper case … | |
Re: >any basic example will help .... Preorder traversal. Search the web. | |
Re: Wow. Do you even know what punctuation is? For that matter, what about capital letters, proper spelling, and understandable grammar? >can anyone help me please My first reaction was: "No, you're beyond help." However, because everyone here seems to think that I'm around for the sole purpose of insulting others, … | |
Re: >how would i make it continuously [b][color=red][size=7]loop[/size][/color][/b] back Do you [b]really[/b] want me to answer this question? Because if I do, I can guarantee that it won't be pleasant for you. | |
Re: >Is there any way to convert my .exe file back to a .cpp file ? No, at least not in the way you want. Too much is lost in the compilation and linking process to get the original source files back. | |
Re: >I didn't know I had to write that myself. You only need to write your own destructor if the default destructor doesn't do what you want. For example, if you have any dynamically allocated memory in your object then you need to write your own destructor. But remember that if … | |
Re: >am i on the right track at all? Does it work? If so then you're on the right track, otherwise you're doing something wrong. | |
Re: >how does the statement change the process It prints a row on each line rather than all rows on one line. | |
Re: 1) return from main 2) exit() from anywhere 3) Crash | |
Re: >that's funny... What's funny is that frrossk made the exact same mistake twice, thus ensuring that the solution wouldn't work. The argument to the system function is a string designating a system shell command, so the correct call would be: [code] system ( "cls" ); [/code] However this is [b]not[/b] … | |
Re: >but i dont want to use exec ls command Why not? It does the job and is much easier to get right than the equivalent code using opendir, readdir, closedir, and stat. | |
Re: [code] #include <algorithm> #include <iostream> using namespace std; int main() { double list[12]; cout<<"Enter 12 numbers: "; for ( int i = 0; i < 12; i++ ) cin>> list[i]; sort ( list, list + 12 ); for ( int i = 0; i < 12; i++ ) cout<< list[i] … | |
Re: Stop making new threads for the same stupid question! I have a sound I'd like you to hear: *plonk* |
The End.