15,300 Posted Topics

Member Avatar for allenash

Welcome to DaniWeb, Al. Hope you enjoy yourself here. [quote]Stuff you Dislike: Pain, people who have no ethics, people with bad temper and who are loud, inconsiderate jerks [/quote] Happily I have not met very many people like that :)

Member Avatar for zandiago
0
40
Member Avatar for Grub

delete line 17 because it is a do-nothing line. line 18 is pushing a pointer to an object that disappears from scope as soon as the function returns to main() -- the pointers are immediately invalidated. Why use a vector of pointers anyway? Just do this: [icode]vector<string> vect;[/icode] and everything …

Member Avatar for Grub
0
265
Member Avatar for Porsche.V

It doesn't work because planeamento table is not in the FROM clause. Correct the query by specifying the planeamento as you did in other places [icode]CONVERT(char(20), planeamento.dt, 105) [/icode]

Member Avatar for tesuji
0
114
Member Avatar for jrkeller27

very easy to read just words [code] #include <string> #include <fstream> using namespace std; int main() { ifstrem in("filename"); string word; while( in >> word ) { // do something with this word } } [/code]

Member Avatar for William Hemsworth
0
1K
Member Avatar for people123

dump that compiler and get VC++ 2008 Express because Microsoft fixed all of them. You no longer need to get the Windows Platform SDK or do all that manual setup in order to compiler MS-Windows programs.

Member Avatar for ismetteren
0
133
Member Avatar for savinki

[icode]xyz = *(long *)abc;[/icode] That works when you KNOW that the character buffer contains the binary value of the long integer. For example [code] int main() { char abc[10] = {0}; long xyz = 123; memcpy(abc,&xyz,sizeof(long)); long xxx = *(long *)abc; cout << xxx << "\n"; } [/code]

Member Avatar for Radical Edward
0
231
Member Avatar for SonxQ7

>> What's the problem here? Nothing. Your program produced expected results for me. I used VC++ 2008 Express.

Member Avatar for jephthah
0
220
Member Avatar for zawpai

>>cin >> (choice,'\n'); What is that? All you need is [icode]cin >> choice;[/icode] Since choice is a single character you might also have to flush the input buffer with all remaining characters so that the next cin will work correctly. See [URL="http://www.daniweb.com/forums/thread90228.html"]this thread[/URL] that Narue wrote about how to do …

Member Avatar for zawpai
0
112
Member Avatar for Drake

18 years ago I got this nice new job and I had to take over maintenance of a C program that was written by someone else long gone. The program was written for MS-DOS 3.1 operating system and had about 20 *.c files with lots of global variables scattered around …

Member Avatar for jephthah
0
189
Member Avatar for Kadence

you could write your own version of new, delete, malloc, realloc and free then keep track of memory usage yourself. If you are running MS-Windows you could view the memory usage in Task Manager.

Member Avatar for Ancient Dragon
0
54
Member Avatar for CoolGamer48

>> since the only other variable on that line is file, and we're not writing to it. Oh but yes you are. [b]file[/b] is supposted to be a pointer to an open FILE object. >>sprite_filename You have not allocated any memory for fscanf() to save the characters. Needs to be …

Member Avatar for mitrmkar
0
85
Member Avatar for shobhit saxena

read [URL="http://www.velocityreviews.com/forums/t285784-constructor-protected.html"]this thread[/URL]

Member Avatar for Ancient Dragon
0
52
Member Avatar for Mike Bean

Welcome to DaniWeb Mike. Sorry that I can't help you but I know there are several experts here that will be more than happy to help you out. Our [b]Web Development[/b] and [b]Site Management[/b] boards are probably just what you are looking for.

Member Avatar for Jx_Man
0
127
Member Avatar for daniel88

If the list only needs to be sorted by book title then just insert new nodes in sorted order. I didn't test this but it should work something like below. You have to save a copy of the previous link when iterating through the list so that the program can …

Member Avatar for daniel88
0
139
Member Avatar for Nemoticchigga

>>Any Ideas as to why it doesnt recognize df? Its a scope issue. You declared it locally in Void button_run_Click(), so its not visible in function delegate_function_callback().

Member Avatar for Ancient Dragon
0
110
Member Avatar for bonnie1234
Member Avatar for Ancient Dragon
0
104
Member Avatar for twgood

>>for a currency converstion program but I am unsure if I am doing the same thing with this one. I don't know what you did before, but it appears all your teacher wants you to do is write more pseudocode, you don't have to actually write the two programs.

Member Avatar for jephthah
0
114
Member Avatar for petzoldt01

It works with cin and cout too. [code] // test1.cpp #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { cout << "Hello World\n"; return 0; } [/code] [code] // test2.cpp #include <iostream> #include <string> using namespace std; int main() { string line; getline(cin,line); cout << "\n\n" << line …

Member Avatar for petzoldt01
0
358
Member Avatar for narendharg
Member Avatar for jephthah
-1
820
Member Avatar for edek

Of course you don't. Don't you know SQL language? If not, then get a good book and learn it. [code] SELECT Projects.* from Projects, Employees where Projects.id = Employees.id and Projects.name = Employees.name [/code]

Member Avatar for JerryShaw
0
70
Member Avatar for DREAMER546

It doesn't work because line line 23 [b]object2[/b] is a null pointer. The declaration on line 13 is hiding the declaration line line 6, so line 13 is not allocating memory for line 6. Also, line 15 is making the array of NULL pointers.

Member Avatar for DREAMER546
0
131
Member Avatar for liork1

try reading some of [URL="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=how+to+read+excel+files+in+c%2B%2B&spell=1"]these gogle links[/URL] It would be a lot easier if you first export the excell file into a *.csv file because csv file is a plain text file that can easily be manipulated using C, C++, or any other computer language.

Member Avatar for Ancient Dragon
0
116
Member Avatar for Beemer

just put lines 28 and 29 in a loop. After line 29 add an if statement to validate data imput. If its ok then exit the loop.

Member Avatar for Beemer
0
284
Member Avatar for gilly_kumar

Years ago we used Microsoft VC++ 1.52C compiler. We had a similar problem and found that malloc() itself cause memory leaks every few hundred calls. We wrote our own malloc() function and the problem disappeared. You might write a small test program to see if malloc() is doing something similar …

Member Avatar for lich
0
274
Member Avatar for Phan

>>Is NCurses compatible with C++? yes >>If so, how do I get a program started in it [URL="http://web.cs.mun.ca/~rod/ncurses/ncurses.html"]Instructions here[/URL] >> Is it just like a library where I include it as a header file after linking to an install directory Yes.

Member Avatar for Ancient Dragon
0
120
Member Avatar for Race

According to the spacing of the code you posted it is missing a close bracket } after line 8 and before line 10 so that lines 1 thru 8 are contained within the if statement starting on line 1.

Member Avatar for Ancient Dragon
0
93
Member Avatar for kllera
Member Avatar for Duoas
0
137
Member Avatar for nu2cpp

what libraries, compiler, and operating system are you using to do all that drawing? If you want the previous cross to disappear when you move the mouse you will have to redraw the cross in the same color as the canvas background. It doesn't disappear on its own. [edit]Or, more …

Member Avatar for nu2cpp
0
204
Member Avatar for elondir

I created a new project in VC++ 6.0, copied the code you posted and compiled. Then imported the *.dsw file into VC++ 2008 Express. It compiled there with no changes, warnings, or errors. So your problem must be someplace else. Here is my program [code=cplusplus] #include <vector> #include <string> #include …

Member Avatar for elondir
0
206
Member Avatar for Traicey

nobody is going to be able to help you if you don't (or won't) post the code. Guess you will just have to learn how to use your compiler's debugger, if it has one.

Member Avatar for Nick Evan
0
77
Member Avatar for kux

[URL="http://www.codeproject.com/KB/cpp/Ellipses.aspx"]Aritle about how to do that is here.[/URL] and the comments at the bottom of the page.

Member Avatar for Duoas
0
89
Member Avatar for picass0

You don't. One socket, one port. On the server side you can reserve a block of ports for use by the server's clients in the [b]hosts[/b] file. The location of that file depends on the operating system. On my computer running Vista its located here: D:\Windows\System32\drivers\etc

Member Avatar for picass0
0
97
Member Avatar for bindiK

The first OpenFile() should be pretty easy. Use the [b]new[/b] operator to allocate menory for an array of ifstream objects, open each of the files, then return the array. The second function is a little more complicated. You will need a loop to read one line from each file in …

Member Avatar for bindiK
0
206
Member Avatar for Nemoticchigga
Member Avatar for Ancient Dragon
0
91
Member Avatar for ryanlcs

I don't think there is any one right answer. I try not to use pointers unless absolutely necessary because they can cause memory leeks and other problems.

Member Avatar for n1337
0
82
Member Avatar for HLA91
Member Avatar for asif.ishaq

>>I don't want to use system tables query and things like that. Things like what? If you use ODBC the result set will contain the table information for the columns returned. I'm sure you could also query the system tables for the info using ODBC. More information might be found …

Member Avatar for Ancient Dragon
0
385
Member Avatar for liaozhenkui

[QUOTE=selfhelpebooks;610967]Hi there, Very ambitious individual aren't ya! Welcome to the site, too.[/QUOTE] Being from China I'll bet English is not his/her first language. So I think the word he wanted to use was [b]devote[/b], not [b]sacrifice[/b]

Member Avatar for Nick Evan
0
78
Member Avatar for Ancient Dragon

I think this has raised its ugly head again. Every time (well most of the time anyway) I post in a thread I get this error: [quote]The following errors occurred when this message was submitted[/quote] But if I hit the IE7's Refresh button my post was acaully made.

Member Avatar for Nick Evan
0
228
Member Avatar for cebubinary

[QUOTE=cebubinary;608692]HI guys. Im a student and studying c++ that and cmd and so far i stil havent figure out how to change my current dir while my program is running. [/quote] See _chdir() function [QUOTE=cebubinary;608692]My program is that i want to make a test.txt file with a "my test file" …

Member Avatar for Nick Evan
0
253
Member Avatar for bindiK

>>I need solution to this immediately. Ok, so why don't you write it. I am watching American Idol on tv and don't have time :)

Member Avatar for Nick Evan
0
126
Member Avatar for Ancient Dragon

icode doesn't retain white space like code tags. Is it possible to make them consistent? Example: // using icode tags [icode]"Now is the time "[/icode] // using code tags [code]"Now is the time "[/code]

Member Avatar for Nick Evan
0
218
Member Avatar for Hockeyfreak889

use srand() to seed the random number generator, rand() to get a random number, and the mod operator % to imit the number betwen 1 and 10. Get that working in your program first, then we can talk about how to make it do that every 1/2 second. You can …

Member Avatar for Ancient Dragon
0
93
Member Avatar for calichik

line 27: That whole function is screwy. When line 27 is executed it will stop that loop because the function will end. The code you put there is not what that function should be doing at all. It's supposed to search though the array and erase the item that contains …

Member Avatar for calichik
0
102
Member Avatar for lese

Well, how do we get the questions and how to we respond to them ? If you post the questions here we can either post our answers or sent you PM with the answers. I know DaniWeb normally does not allow answers via PM but this may be a special …

Member Avatar for lese
0
268
Member Avatar for Valk1520

Welcome to DaniWeb -- I'm just a few 5 years younger than you :) I think you and I are the oldest here, but there are a couple others pretty darned close. I hope you feel free to share your experiences and vast knowledge with everyone here on the technical …

Member Avatar for Serunson
0
141
Member Avatar for projectsdw

Welcome to DaniWeb. You can advertise your job needs in the [URL="http://www.daniweb.com/forums/forum72.html"]Looking To Hire Forum[/URL]

Member Avatar for Serunson
0
97
Member Avatar for Eulerito

line 13 is wrong. You are passing a pointer to a pointer as the second parameter. Leave off the & symbol [icode]ReadFile(hFile, [color=red]someread[/color], sizeof(someread), &n, 0);[/icode] Also the program should check to see that CreateFile() succeeded. Never assume success. If [b]myfile.txt[/b] is a standard ascii text file with lots of …

Member Avatar for Asat232
0
117
Member Avatar for wellibedamned

>>anyone knows why? Yes. how about something like this: [code] char* lastWord = NULL; while( tok != NULL ) { lastWord = tok; tok = strtok(NULL, " "); } printf("%s\n", lastWord); [/code]

Member Avatar for Nick Evan
0
82
Member Avatar for Nick Evan

They always look like that on my computer. Thought it was just me because I have the font size set pretty high on my computer.

Member Avatar for Ancient Dragon
0
356

The End.