15,300 Posted Topics

Member Avatar for shlokka
Member Avatar for isrinc

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 …

Member Avatar for Ancient Dragon
0
276
Member Avatar for Programmer629

You might be able to get source code from one of [these](http://www.osalt.com/mediaplayer) open source programs.

Member Avatar for Ancient Dragon
0
324
Member Avatar for anandhakrishna

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.

Member Avatar for totalwar235
0
290
Member Avatar for skliz

How are you displaying the information? Are you using a control of some kind or writing directly onto the form?

Member Avatar for ddanbe
0
276
Member Avatar for Ancient Dragon

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.

Member Avatar for Ancient Dragon
0
101
Member Avatar for Gaiety

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 …

Member Avatar for Gaiety
0
152
Member Avatar for MRehanQadri

Because the second halv of that statement is the assignment operator = instead of boolean operator ==.

Member Avatar for MRehanQadri
0
687
Member Avatar for IsaacMessi10
Member Avatar for IsaacMessi10
0
168
Member Avatar for nilesh7136
Member Avatar for mrnutty

I have mixed emotions about it. What if I don't want the same avatar on all web sites that I visit?

Member Avatar for mrnutty
0
231
Member Avatar for miles.sifflet

line 45: used boolean == operator, not the = assignment operator. lines 139 and 164: remove the semicolon at the end of the line

Member Avatar for miles.sifflet
0
410
Member Avatar for nova37

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.

Member Avatar for AndreRet
0
2K
Member Avatar for tux4life

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.

Member Avatar for Ancient Dragon
0
179
Member Avatar for GottaLove

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: …

Member Avatar for Ancient Dragon
0
935
Member Avatar for Rahul47

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 …

Member Avatar for azareth
0
351
Member Avatar for swiss21

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 …

Member Avatar for Ancient Dragon
-1
195
Member Avatar for clouds_n_things
Member Avatar for khair.ullah

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.

Member Avatar for Reverend Jim
0
296
Member Avatar for <M/>

>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 …

Member Avatar for <M/>
0
221
Member Avatar for pedders

>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.

Member Avatar for Ancient Dragon
0
1K
Member Avatar for ConfusedLearner

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.

Member Avatar for shashikumar s g
0
284
Member Avatar for TheBrick

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. …

Member Avatar for TheBrick
0
183
Member Avatar for Lardmeister

>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.

Member Avatar for vegaseat
0
192
Member Avatar for asif49

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.

Member Avatar for BitBlt
0
316
Member Avatar for josverhoeff

Welcome Jos, there are several of us old-but-not-yet-obsolete programmers around.

Member Avatar for santanfordcust
0
166
Member Avatar for group256

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; …

Member Avatar for deceptikon
0
285
Member Avatar for nah094020

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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for ConfusedLearner

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 …

Member Avatar for Ancient Dragon
0
133
Member Avatar for BobFX

You don't need a hook function to do that. Just call [SHBrowseForFolder](http://msdn.microsoft.com/en-us/library/ms647664.aspx)() function

Member Avatar for BobFX
0
3K
Member Avatar for ChicagoBears2012

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)`

Member Avatar for ChicagoBears2012
0
118
Member Avatar for Zakkaria

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 …

Member Avatar for Ancient Dragon
1
332
Member Avatar for dmd12b

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); …

Member Avatar for Moschops
0
963
Member Avatar for phfilly

> 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 …

Member Avatar for can-mohan
0
294
Member Avatar for Ancient Dragon

I think it odd that I can't post "kick-ass" (such as in kick-ass computer) when shit and damn are ok.

Member Avatar for Reverend Jim
0
179
Member Avatar for greatman05
Member Avatar for IsaacMessi10
Member Avatar for deceptikon
0
292
Member Avatar for Ancient Dragon

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", …

Member Avatar for triumphost
1
687
Member Avatar for <M/>

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 …

Member Avatar for Ancient Dragon
0
79
Member Avatar for XEN0

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).

Member Avatar for XEN0
0
362
Member Avatar for menonnik

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.

Member Avatar for Nagendra Prabhu
0
216
Member Avatar for TonyG_cyprus

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 …

Member Avatar for mike_2000_17
2
112
Member Avatar for jangojan

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.

Member Avatar for Ancient Dragon
0
92
Member Avatar for adelaalan

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 …

Member Avatar for Lardmeister
-1
409
Member Avatar for baabjitvk

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.

Member Avatar for AndreRet
0
136
Member Avatar for Ancient Dragon

Warning. [This YouTube video](http://www.youtube.com/watch?v=Ufm5UzFVxKw) contains adult language .

Member Avatar for <M/>
5
122
Member Avatar for RaoxFaello

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 …

Member Avatar for Ancient Dragon
0
576
Member Avatar for xHellghostx

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.

Member Avatar for Ancient Dragon
0
213
Member Avatar for shukla ronak

I want to build a house. I already have a hammer. Can you tell me how to build my house?

Member Avatar for Schol-R-LEA
-2
127
Member Avatar for sarah.mathieson.7

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, …

Member Avatar for Ancient Dragon
0
222

The End.