15,300 Posted Topics

Member Avatar for icetux

you need an opening brace { between lines 53 and 54 (or at the end of line 53 if that is your coding style) and remove the semicolon at the end of line 58. lines 78, 81 and 85. [b]values[/b] is a 2d array of doubles and you are attempting …

Member Avatar for Salem
1
221
Member Avatar for bops

To check a password on MS-Windows os all you have to do is attempt to log in with the user name and password -- there are win32 api functions that allow programs to do that, assuming it has appropriate permissions first.

Member Avatar for Ancient Dragon
0
105
Member Avatar for Dave Sinkula

Fred Thompson for President :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :scared: He did make a good da on Law & Order. Much better actor than Ronald R. was, but not even close to being the same kind of politician.

Member Avatar for Lardmeister
0
114
Member Avatar for trey.jonn

>>Is there any need to escape a Registry Key path when reading it from a file No -- escape characters are only useful for string literals which are interpreted by the compiler at compile time.

Member Avatar for Ancient Dragon
0
155
Member Avatar for bops

And don't forget to close the file < CloseFile() > before leaving that function!

Member Avatar for Tight_Coder_Ex
0
261
Member Avatar for amishosh

When writing MS-Windows programs I always used CreateThread() because it seemd to be simpler. There are several pitfalls with threads -- specifically you have to snychronize the use of variable and code that are commen to all threads. For example suppose you have a global variable that is set by …

Member Avatar for Ancient Dragon
0
246
Member Avatar for xxCattehxx
Member Avatar for asilter

One thing that may cause that behavior is if the two functions are in different program units (*.c files) or libraries and compiled with different packing factors. Another cause is two functions in different program units using different versions of the same structure. Check your computer's file system to see …

Member Avatar for asilter
0
164
Member Avatar for n.aggel

I don't think its undefined behavior, just bad coding. In function wow() x and z both are references to the same object, so any changes to x is also reflected in z. After line 7 is executed the value of both x and z is 1. After line 9 is …

Member Avatar for n.aggel
0
123
Member Avatar for avgprogramerjoe
Member Avatar for MidiMagic

[QUOTE=MidiMagic;419668]- Why do most spreadsheets and programming languages do trigonometric functions in radians, when most people use degrees?[/quote] For the same reason Americans use Imperial system of measurememt while most europeans use the metric system. Just because. [QUOTE=MidiMagic;419668]- - Why do most of the C-based languages (including Java, JavaScript, and …

Member Avatar for Dave Sinkula
0
179
Member Avatar for sDJh

The only two I have worked with are manufactured by [URL="http://www.symbol.com/products/mobile-computers"]Symbol Technologies[/URL] and [URL="http://www.intermec.com/products/computers/handheld_computers/index.aspx"]Intermec.[/URL] Both cost several hundred $$$.

Member Avatar for TkTkorrovi
0
134
Member Avatar for Mdizzle

what you need is a 2-dimensional array of integers with 10 columns and a dynamically expandable number of rows to hold the scores. [URL="http://www.taranets.com/cgi/ts/1.37/ts.ws.pl?w=329;b=286"]Here[/URL] is some more information about this: After you understand multiple-dimensional arrays and how to allocate them then you will be ready to read the data into …

Member Avatar for rohit_hegde
0
125
Member Avatar for Ken JS
Member Avatar for Dave Sinkula
0
138
Member Avatar for eXceed69

>>Here's a sample, but I don't understand And neither does anyone else here. That function is specific to the database library you are using, which you failed to identify. You need to read the documentation written by whoever wrote that function. A more general way of accomplishing it is to …

Member Avatar for Ancient Dragon
0
296
Member Avatar for jaepi

yes, use standard C functions in stdio.h such as fopen(), fseek(), fread() and fwrite() or c++ functions in fstream. They are a lot more portable too.

Member Avatar for Ancient Dragon
0
38
Member Avatar for Salem

by tooltips do you mean the thread preview that follows the cursor around on the menu page ? Yes I don't like that either and find it not at all useful when there is more than 1 post in the thread. Its just annoying.

Member Avatar for WaltP
0
311
Member Avatar for ramavundela

>>can anybody help me to write the following program Yes someone here will [b]help[/b] you but you first have to post your code and ask questions about what you don't understand. We will not write the program for you.

Member Avatar for WaltP
0
136
Member Avatar for Chaky

Also, Dani changed the rules a couple weeks ago and removed all rep that was given in Geeks Lounge. Many Members lost dots.

Member Avatar for Chaky
0
98
Member Avatar for WhYuLoOkIn

win32 api [URL="http://msdn2.microsoft.com/en-us/library/ms724942.aspx"]SetSystemTime()[/URL] One problem with your program is that many computers automatically synchronize the system time with something else, such as a network computer or a satellite. In that case whatever you set the computer to will eventually be changed. >> can't set the time during run time why …

Member Avatar for Ancient Dragon
0
121
Member Avatar for Ancient Dragon

Just finished installing this linux-like os and had to post a message. Its kind of nice os, open source and free of course. It all fits on one CD and has several packages that can be added after installation. Its truly an os-for-dummies, It was even easier to install then …

Member Avatar for Infarction
0
210
Member Avatar for shannonpaul

what are the errors. maybe you need to add braces { and } around lines 21, 22 and 23 to make them all part of the loop.

Member Avatar for ndeniche
0
128
Member Avatar for Arctic wolf

lines 13 and 14 are incorrect. Should be this: [code] printf("using &num= %p\n", &num); [/code] Your line 14 will probably cause access violation because printf() assums the first parameter is an ascii null-terminated string, and passing a pointer to a variable is not that kind of thingy. [edit] ^^^ what …

Member Avatar for vijayan121
0
717
Member Avatar for tonyaim83

vector does all the dynmaic allocation for you -- just call its push_back() method to add a new row. [code] string line; vector<string> array; ... // now put this inside the file read loop just after getline() array.push_back(line); [/code]

Member Avatar for vijayan121
0
131
Member Avatar for kazek

searching a file for a specific string is fairly straight forward. Open the file, read each line and search the lines for desired string. use std::ifstream object for the file, getline() to read each line into a std::string object, the use the string's find() method to see if it contains …

Member Avatar for kazek
0
2K
Member Avatar for vaisakhpaacet

If you use win32 api functions there is an edit control that does most of that for you. You just have to implement the File and other menu items.

Member Avatar for Ancient Dragon
0
77
Member Avatar for Majestics

There are win32 api functions that let you change the shape of the cursor, but to change its speed and other configurations use the control panel.

Member Avatar for Ancient Dragon
0
65
Member Avatar for Ahmed Padela

when using 32-bit programs you have to forget about what you learned with old 16-bit compilers. It ain't gona work. They don't support anything in graphics.h or dos.h. You will probably have to do a 90% rewrite of that program you want to compile. If you want to do ms-windows …

Member Avatar for jwenting
0
226
Member Avatar for Ancient Dragon
Member Avatar for MidiMagic
0
66
Member Avatar for MidiMagic

[QUOTE=MidiMagic;416412]Not simple. The code tags are messing up the code indenting when I do that. I then have to edit again to fix that. [/QUOTE] My guess is that you are using tab characters as well as spaces. All editors screw up the code when you mix tabs and spaces …

Member Avatar for MidiMagic
0
344
Member Avatar for addicted

[offtopic]Hey Dani -- is that a new kind of tag ? [ search ] This is the first time I've seen it used. Really neat :) [/offtopic]

Member Avatar for Dani
0
77
Member Avatar for teddymon

line 187: you forgot the parentheses after the function name. Same with all other functions, so I won't tell you the line numbers. >>I don't know how to declare the funtions before it reach the int main? Pretty easy -- just copy the line with the function name to somewhere …

Member Avatar for Salem
0
92
Member Avatar for mayuning2nd

compile it on MS-Windows with a compiler that supports MS-Windows or use a cross compiler on *nix that generates MS-Windows file format executables. Just simply renaming the file is not sufficient.

Member Avatar for TkTkorrovi
0
167
Member Avatar for spinaltoad

instead of the dot operator use pointer operator [code] myClient->call(serverUrl, methodName, "ii", &result, 5, 7); [/code] But make sure the pointer is a valid pointer -- it has to be initialized to something before the above line can be successfully executed. [code] myClient = new xmlrpc_c::clientSimple; [/code]

Member Avatar for Ancient Dragon
0
143
Member Avatar for jaepi

One explaination of threads is [URL="http://www.codeproject.com/threads/crtmultithreading.asp"]here.[/URL]. Exactly how to apply it to your program depends on what you want the threads to do.

Member Avatar for Tricci
0
85
Member Avatar for phalaris_trip

search [url]www.codeproject.com[/url] -- they have a couple dozen example mfc programs. You should put your initialization code in the OnInitDialog() function, which gets called by DoModal(). And you may have to subclass the CEdit control.

Member Avatar for Ancient Dragon
0
445
Member Avatar for asilter

>>destNo = sourceNo<<n; // Here n is the number of bits you want to skip. Here, the value of n is undefined because you didn't initialize it to anything in the previous line :)

Member Avatar for WaltP
0
257
Member Avatar for The Dude

I don't like catsup on either eggs or fries but I know a lot of other people that do. The only thing that goes on an egg is a muffin.

Member Avatar for Ancient Dragon
0
251
Member Avatar for em_i

unfortunately there is really nothing you can do about it except to use a 64-bit integer, such as long long or _int64. What you are experiencing is data overflow -- integers can only hold a finite number of digits. The file limits.h contains macros that are the maximum values for …

Member Avatar for iamthwee
0
167
Member Avatar for tonyaim83

post code and an actual example string. For example: "a b c" replaced by "abc". If that's what you want to do when code a while loop something like this: [code] string::size_t pos; while( (pos = mystring.find(' ')) != string::npos) { mystring = mystring.substr(0,pos) + mystring.substr(pos+1); } [/code]

Member Avatar for Bench
0
2K
Member Avatar for ishwarbg

[URL="http://www.daniweb.com/forums/thread6542.html"]Here[/URL] is a short ifstream tutorial. Its a little old, so replace [b]fstream.h[/b] with [b]fstream[/b] because current c++ standards have dropped the [b].h[/b] file extension.

Member Avatar for vijayan121
0
98
Member Avatar for ~s.o.s~

[QUOTE=joshSCH;422949]Hello, Sanjay! Welcome! :D[/QUOTE] Better a year late than never :ooh: I think everybody knows this DaniWeb Icon by now.

Member Avatar for thunderstorm98
1
325
Member Avatar for eXceed69

you need to be a little more specific -- monitor error code occurrences about what? delete instances of what in what DB? Your description is way too brief to be of much value.

Member Avatar for eXceed69
0
118
Member Avatar for santoshmath

The next bug is at line 15 -- feof() doesn't work the way you think. Instead, you should code it like this (which will only work with text files. binary files are coded differently because the EOF character could be a valid character in the file.): [code] while( (ch=fgetc(fp)) != …

Member Avatar for santoshmath
0
109
Member Avatar for karimnouh

[QUOTE=Infarction;422364]They'll probably tell you to never use goto as well, but that doesn't mean you should just listen to them. Find out why, and then do what is best; and yes, the popular opinion can be wrong sometimes..[/QUOTE] Most, if not all, professional programmers refuse to use the [b]goto[/b] statement, …

Member Avatar for Infarction
0
305
Member Avatar for qaiser
Re: c++

search the array backwards -- go to the end of the array and search to the beginning by decrementing the loop counter.

Member Avatar for Ancient Dragon
0
93
Member Avatar for quintoncoert

Lets see if I have this straight: get input from keyboard on computer #1 and send it via serial port to the keyboard buffer on computer #2. Yes that is certainly possible and will require you to write two different programs -- one for each computer.

Member Avatar for TkTkorrovi
0
127
Member Avatar for bappa_ayan

[QUOTE=Salem;423164]@OP If you're into deep problems, perhaps a career in oceanography would be to your liking ;)[/QUOTE] or one in deep space abord the Startrek Voyager :)

Member Avatar for Salem
-1
125
Member Avatar for ProgrammersTalk

I'm retired now and on Social Security. Yea -- you young working or soon-to-be-working Americans can support me now for the rest of my life just as I supported my elders over the past 45 years. But I keep myself busy working part time at Wal-Mart (all old retires work …

Member Avatar for EnderX
0
315
Member Avatar for Mitchelle

The End.