569 Posted Topics
| |
Re: input.c(375) : error C2065: 'ulong' : undeclared identifier: Are you declaring `ulong`? i.e. `typedef unsigned long ulong;` This might fix the other errors you have, I'm unsure since I don't have access to the full source code. | |
Re: Surely something like this..? If you have a static variable called "counter" and then increment it by 1 each time the constructor is called then this should work. #include <iostream> using namespace std; class Foo { public: Foo() { counter++; } int getCount() { return this->counter; } protected: static int … | |
Re: I think, this can be completed in Polynormal Time, if I'm honest. If something, for example Euclidean TSP it would still be NP-Hard but not NP-complete. Hope this helps :) | |
Re: 1) Are you sure you're entering the right details? 2) Are you sure you have permission to access the database? 3) Are you sure you're connecting to the right database? The error message it gives, is pretty clear. What's there not to understand? | |
Re: It's been a while since I've looked at Java, so, forgive me if this does not work. In brief, what you're trying to do is delcare a method within a method - This is not allowed hence the error you're getting. I have fixed the error, however, since you're declaring … | |
Re: Have you debugged this? It's pretty hard for someone to compile the code to find the error when we don't have the specific external Libraries. You should therefore try the following: [Valgrind](http://valgrind.org/docs/manual/quick-start.html) | |
Re: This is totally based upon my own opinion and is not to hit out at anyone, or, take favour in any other question based forum that may exist on the internet. * Boring at times, not very quick paced At times it can be, and, this seems to be mainly … | |
Re: As @ddanbe has stated, for Correlation to work, you must correlate between two objects/variables. Please could you explain what it is that you're trying to do? For example, if image (A) is the unencrypted image and image (B) is encrypted and you needed to therefore match image (A) to image … | |
I'm attempting to implement the Factory Pattern. I have a class called "Window" which has a class member function which determines which object is being called and then assigns the particular object pointer. I have written the following code: class Hamming { public: Hamming() { } Hamming(int theSize) { // … | |
This came across me the other day, and it got me thinking. Let's assume I have a very quick question, for example, I had one the other day: > How much implementation can you actually put inside a constructor? For me, personally, I did not want to make a post … | |
Sorry if this is hard to understand what I'm trying to do here, but, I do not know how to approach this. I am using method overloading in my constructors of a class, and I have multiple "Window" functions which are all classes that can be used and I need … | |
Re: Your code compiles for me. Are you sure you're passing something in the arguments? If I enter "Hello" into the argument then I get the following: `Hello 0Hello` If no argument is passed through, this code will segment, you should allow for this. | |
Re: Hey, I learnt by starting to write what I was interested in.. So for example, the first application I built in PHP was a register and login system, from there I gained experience. There's no real "Best project to start learning" I would pick something that is: 1) Easy/less complex … ![]() | |
Re: ... And the problem is? | |
Re: > Call me crazy, but I'm pretty sure you misinterpreted "Do not use any string or array functions" How can you store a letter (sentence, letter as in formal message) without at least allocating memory for it in some arbitrary place or another? I don't see where in this assignment … | |
Re: Hello, There are a few problems within your code but, this stands out for me: `$sql="SELECT * FROM users WHERE username='{$user}' AND password='{$password}' LIMIT 1;";` Do you really need the `LIMIT 1` here? I wouldn't say so, because, this SQL statement can only really return one row if you have … | |
Re: First off all, in my honest opinion I wouldn't "rate" myself in languages. Whatever the language/rating is. From my view, let's say I rated myself 10/10 for PHP.. That's kind of like saying: `I know EVERYTHING about PHP` Thus meaning with that attitude I might not be able to progress … | |
Hello, I am having a few problems when trying to execute the a Makefile that will *hopefully* create a static library that I can use for future use. Here is my code below: #----------------------------------------------------------------------------- # Usage of make file #----------------------------------------------------------------------------- # Clean operation: # make -f MakeClient clean # # … | |
| |
Re: Daniweb rules clearly state that a thread cannot be requested to be deleted (Unless the rules have seriously changed). If the thread contains personal information then you can request this to be edited out from the thread. Hope this helps :) | |
Re: Try the following: `int main( int argc, char* args[])` Instead of: `int main( int argc, char*, args[])` Hope this helps :) | |
Re: First of all, it's good practice to declare your class variables like this: protected: int id; int section; int quiz1; int quiz2; int finalExam; static int count; There are also `private` and `public` Second problem, in the function void set(static int counter ){ counter = count; } You are passing … | |
So basically, I'm working on a project that can require both arrays and vectors to be passed through in order to calculate the final outcome. Now, I'm using the constructor to calculate the values and I need to know whether or not it is possible to change the datatype of … | |
I have not visited PHP/MYSQLI for some time now, and, need some guidance on the following problem: I'm trying to retrive all the data from the given week and just in that week. My table looks like the following: id int(11) type varchar(255) week datetime And as a test data … | |
Re: You are incrementing by 1, and, outputting the method. Also, your class is wrong: #include <iostream> using namespace std; class B { public: B() { }; int func() { return this->data++; } private: int data; }; int main(int argc, char *argv[]) { B b; cout << b.func() << endl; cout … | |
Re: "No matter how many books you read, there are certain things in this world that you never, never understand" | |
Re: Your questions does not make sense. What do you mean > area of posters in the pan Posters? Pan? | |
Re: What is your question? What are you trying to do? What are you finding difficult? We cannot help you if you do not provide enough details. Understand this! | |
Re: Are you spamming the system? If you have a question, then ask it! Do you want us to read your mind to find out the question? | |
Re: Hey, Probably a silly question.. Have you tried echoing the `$Username` and `$Password` and `$Curpassword` to see if they contain the expected values? | |
Re: In your code there is an error: void set_Name(string n){ string dvdName=n; } Since you re-clare `dvdName` as a string. This is not correct. First re-design your class into a structure that is more Encapsulation: Let's call this class "dvd.h" class DVD_DB { static int TotalDVD; public: DVD_DB(); void set_Name(string … | |
Re: You should attempt to look at HTML5. There is a tag: [Here](http://www.w3schools.com/html/html5_audio.asp) You can also use jQuery etc.. To manipulate and extend this feature more. Is there a specific reason to why it has to be in PHP? | |
Re: Hey, What is the purpose of the example you are trying to give? Polymorphism is about change "poly" and thus meaning that the expected outputs for each can be changed depending on which object is called. Look at another example (The one you gave does not really make sense *to … | |
Re: Hello, If you're reading a .wav file then you need to read the file properly; the .wav file contains both the "Header" information, as well as the actual "raw data" and you need to read these separately rather than the whole of the file. You can check this website for … | |
| |
Re: Here is an example: #include <iostream> using namespace std; bool uppercaseLetter(char ch) { if(isupper(ch)) return true; else return false; } int main(int argc, char *argv[]) { char ch; cout << "Please enter the character"; cin >> ch; if(uppercaseLetter(ch)) { cout << "Yes, its uppercase"; }else{ cout << "No, it's not … | |
Re: What do you mean, nothing shows? Have you declared an object of this class?... | |
Hey guys! Just a quick question really: What happened to the spell check when you write in the forum posts? It seems to have gone for me D: even though I recieive the feature in other forums (no names) it's just annoying sometimes because I have to concentrate really hard … ![]() | |
Re: > idea to try and write a program that will help other people write C++ programs I don't think you should be doing this just now, IMO because as you said you're a beginner yourself - Teach yourself before you start writing tutorials etc.. :) Of course, it might be … | |
Re: Hey, I agree, kind of. However, I don't personally get too caught up on reputation points (They don't pay the bills!!) so therefore, it doesn't effect me what *Person A* and *Person B* has. My ethos is that you should want to help someone regardless of how many reputation points … | |
Re: Hey, Try the following: `ini_get('safe_mode')` Before the function declation, if you've compiled PHP with `--enable-safe-mode then defaults to On, otherwise Off.` then this error would happen. For more information, check the following: [Here](http://php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode) Hope this helps you. | |
![]() | Re: Just throwing this out there, this may not be the solution. In this line you set the following interger to be a random number, where do you get this number from? const int SIZE = 500000; But, where you call your quick sort you call the following: quickSort(test, 0, SIZE-1); … |
Re: Eh? Explain your question in more detail. This is very unclear! | |
Re: The way you're doing it is very bad, very, very bad. 1) You should only let people have access to the api if they have a 'key' (at the moment anyone can access it) 2) You need a way to encrypt the 'password' if not, it's plaintext. | |
Re: Sorry, which distro is this? I assume that you're working with a Raspberry Pi? But, I have never heard of this distribution. | |
Re: Do you mean something like: <?php $arr = array('mango','apple','orange','bat','cat','mat'); foreach ($arr as $a) { echo $a . '<br />'; } ?> ![]() |
The End.