15,300 Posted Topics
Re: Fire the developer you hired and hire someone more competent. | |
Re: new and delete do not change the value of pointers, that's your responsibility. And if you delete a pointer then allocate it again with new there is no guarentee that new will return a pointer to the same memory that was previously deleted. If you wish that to happen you … | |
Re: You might be able to get source code from one of [these](http://www.osalt.com/mediaplayer) open source programs. | |
Re: That doesn't look like compilable code to me. What if statement does the else belong to? Can't be line 7 because that's not a multi-line statement that needs { and }. Lines 14 and 15 are just junk. | |
Re: How are you displaying the information? Are you using a control of some kind or writing directly onto the form? | |
Anyone use this distribution? I have a big big problem with the keyboard -- it misses characters or irradically repeats random characters. I might press a key quickly once and the driver will repeat it 100 or more times. Other times it misses the key altogether. | |
Re: It might be easier if you don't use that fixed-length buffer at all. Just put the characters into temp, when temp gets filled up call realloc() to make it bigger. You need two int variables, one to keep track of the current position to add a new character and the … | |
Re: Because the second halv of that statement is the assignment operator = instead of boolean operator ==. | |
Re: did you think to google for "vb.net database tutorials"??? | |
Re: I have mixed emotions about it. What if I don't want the same avatar on all web sites that I visit? | |
Re: line 45: used boolean == operator, not the = assignment operator. lines 139 and 164: remove the semicolon at the end of the line | |
![]() | Re: You can't download silently because that would violate computer security although there are probably ways to get around that. The only reason I can think of why you would even want to do that is if you are writing a virus or something like that. |
Re: The two tabs are completely separate sessions. Logging out of one tab does not log you out of the other. I would expect that same behavior to occur on any web site. I know it works like that on an online backing site I frequent. | |
Re: the vector is not populated with anything. #include <vector> #include <string> #include <iostream> using namespace std; class B; class A { public: friend B; A(string n) {username = n;} A() {} static vector<A*> data; //store info in vector string getUserName() {return username;} protected: string username; }; class B { public: … | |
![]() | Re: how are you displaying form2? I do it with a button click in form1. So after creating an instance of form2 you just assign the text from form1.textox1.text to form2.label1.text Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim fm2 As Form2 = New Form2 fm2.label1.Text = Me.textbox1.Text … |
Re: I didn't read your whole program, but all the scanf() starting on line 33 are wrong `scanf("%s",&fname[100]);` That is passing a pointer to the last element of the fname array. It should be passing a pointer to the first element, like this: `scanf("%s",fname);` Notice it is not necessary to use … | |
| |
Re: You might put the connection string in an app.config file so that it can be customized for each computer on which the program is running without recompiling the program. | |
Re: >Isn't it interesting that they blame the black out on beyonce? Yes, it was her fault -- she was REALLY HOT wasn't she :) :) Quote from Washington Post: >On NBC’s “The Today Show,” Barbara Lippert, editor-at-large at mediapost.com, said she believed the commercial was racist because it was “just … | |
Re: >I want to make sure that nothing can be accidentally altered. How do you "accidentally" alter something in a program? If your program alters the data it's on purpose, not by accident. Want read-only? Just make sure your program doesn't attempt to alter the data. | |
Re: delete line 4. It is not necessary to prototype main() as it is a special function. And there is no semicolon at the end of that line. | |
Re: It's called "burn out". If you work intensly at anything for long periods of time you will get so sick of it you won't want to do it ever again, or at least for awhile. I'm that way with catfish. I grew up on a farm which bordered a river. … | |
Re: >I'm intrigued by Budweiser being the last on the list ( Yes, surprising to me too. Maybe it's because the Bush family doesn't own the company any more. There was a [hostile takeover](http://www.nbcnews.com/id/43704785/ns/business-us_business/#.UQ6s_aV9KTU) a few years ago (2008). The company hasn't been the same since then. | |
Re: I always like reading and posting on DaniWeb. Just make sure your employer is ok with browsing the web while at work because many employers keep track of what you browse and when. | |
Re: Welcome Jos, there are several of us old-but-not-yet-obsolete programmers around. | |
Re: there should be only one star for data in function parameters, like this `bool push(Elements **Stack, void *data);` Two stars means pointer to pointer, which is not what you want bool push(Elements **Stack, void *data) { Elements *elem = new Elements; if (!elem) return false; elem -> data = data; … | |
Re: 1. You need to provide a function prototype for playgame() 2. Line 43: remove the semicolon at the end of the line. 3. line 70: you need to provide an else without any conditions to account for cases when the user enters something else. 4. I think the biggest problem … | |
Re: You might want to change the code so that you can enter as many numbers as you want. You don't want to have to change the code every time you want to enter more numbers, or do you?? Maybe you do, but I wouldn't. You can do that by using … | |
Re: You don't need a hook function to do that. Just call [SHBrowseForFolder](http://msdn.microsoft.com/en-us/library/ms647664.aspx)() function | |
Re: fgetc() returns int, not char. >The return type is int to accommodate for the special value EOF, which indicates failure: The while loop should be this so that the rest of the code isn't run when fgetc() returns EOF: `while( (c = fgetc(myfile)) != EOF)` | |
Re: First create a text file that contains a couple names and passwords. You will ultimately need to eencrypt the passwords to prevent people from just using Notepad to read the text file. But you can skip that for now. Then create a loging form with user name and password text … | |
Re: Why not just combine the two functions by setting a default value for the parameter, they are both the same thing anyway class Date { public: Date(); Date(const int m); Date(const int m ,const int d,const int y); void Input(); void Show(); bool Set(int m,int d,int y); bool SetFormat(char f); … | |
Re: > why is it that the c2.LunchTime() triggers the copy constructor? Because the function is returning an object and the only way to return it is by making copy of it. If you changed it like this then the copy constructor would not get called because the function would return … | |
I think it odd that I can't post "kick-ass" (such as in kick-ass computer) when shit and damn are ok. | |
Re: how are you catching keystrokes and writing to the window? | |
Re: Are you using the browser control? URL is one of it's properties. | |
I know how to create a function with variable argument list, but how do you create one when the argument type is unknown, something like MyPrintf(...) ? From what I've read CLR/C++ only supports known argument types, such as int, `MyPrintf("...array<Int32>^ arr)` and the calling function int main() { MyPrintf("One", … | |
Re: I don't buy computers any more, just buy parts and let my son put the parts together to make a computer. I got a kick-ass computer for gaming a few months ago that way so that I can play Diablo 3. And I probably saved about 25% or more over … | |
Re: Alternatives are shared memory (via [the Clipboard](http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx)) and [memory mapped files](http://msdn.microsoft.com/en-us/library/dd997372.aspx). | |
Re: Those header files are used on *nix machines. MS-Windows does not support them. just include winsock2.h and ws2_32.lib for sockes on MS-Windows computers. And replace that obsolete Dev-C++ compiler/IDE with Code::Blocks or VC++ 2010 Express, both are free and current. | |
Re: I also agree. When I was working on a team several years ago, I was senior member and young people was ask me how to do this or that. My response: RTFM! and use google to do research. If they still couldn't figure it out then I'd help them. It's … | |
Re: You have to change the main() function in Program.cs. In VS 2012 there is a line that says this: `Application.Run(new Form1());` Just change Form1 to the name of your login form. | |
Re: Last year I bought a Cannon 65D just to play with. It takes great pictures and it's easy to use. Admittedly I have not learned everything yet. The only thing I don't like about it is the picture files are sooo huge that I have to crop them down in … | |
Re: What have you attempted so far to solve the problem? Do you know SQL? What sql statement(s) are you using? If you don't know SQL then you need to [study a tutorial](http://www.w3schools.com/sql/default.asp). Also, post the code you have written for this question. | |
Warning. [This YouTube video](http://www.youtube.com/watch?v=Ufm5UzFVxKw) contains adult language . | |
Re: First you will have to learn fundamentals of SQL (Structured Query Language), which is the language used by Access and other databases such as MySQL, Oracle, Sybase and MS SQL (there are lots of others too). If you already know that then go on to reading a tutorial. [Here](http://www.pcreview.co.uk/forums/using-ms-sql-c-guidelines-t3612777.html) is … | |
Re: Do you mean get and set, see [this link](http://www.dotnetperls.com/property-vbnet). If you want read-only, don't incloude the set. If you want write-only don't include the get. Include both if you want read-write. | |
Re: I want to build a house. I already have a hammer. Can you tell me how to build my house? | |
Re: Why are you checking for KEY_DOWN and KEY_UP? Shouldn't you be checking for the keys that are pressed, such as '1', '2', 'a', 'b', etc. If you have a menu that has three options and you need to enter '1', '2' or '3' then that should check for those values, … |
The End.