15,300 Posted Topics

Member Avatar for mingas

>>(I will also post this thread at c++ area, hope you don´t mind ) Yes we do so don't do that. Pick a forum and stick with it.

Member Avatar for Ancient Dragon
0
213
Member Avatar for saracooper

memory for that array is not layed out by pointers. The first 20 bytes are for the first string, that is followed by the next 20 bytes for the second string, etc. So fetchoutStr() needs to treat it as if it were just a single-dimension character array that can hold …

Member Avatar for saracooper
0
2K
Member Avatar for Ancient Dragon

I'm in the market for a blu-ray drive on my HP computer. I've googled and found a few, rather expensive ones. All I want to do is play blu-ray movies with it -- don't way to bun them or use it to copy them. Anyone have any knowledge about them …

Member Avatar for caperjack
0
63
Member Avatar for uniquereason

delete lines 80 and 81 because those two variables are not needed. Now all you have to add is a simple loop tocompare the letters of each string. If they are not then same then increment NumMissed counter.

Member Avatar for Nick Evan
0
182
Member Avatar for AlmaREY

>>while (status=2) Use the boolean == operator there, not the assignment = operator. >>The pointer says the error is in the line previous to main. The line previous to main() is a blank line. Repost your current code so that we can see what you are talking about.

Member Avatar for Ancient Dragon
0
275
Member Avatar for smbee

In think this is what you want. Allocating pointer p is not necessary. To make a PXQ array you have to allocate Q integers for each row in P. [code] void destroyArray(int **a, int P) { int i; for(i = 0; i < P; i++) free(a[i]); free(a); } int **allocarray(int …

Member Avatar for Ancient Dragon
0
146
Member Avatar for rlindsey
Member Avatar for robinotje

>>if (option == "enter") { You can not compare strings like that in C programs. use [icode]if( stramp(option, "enter") == 0) { [/icode] >> tell me what header I have to use for 'fgets'? stdio.h

Member Avatar for WaltP
0
454
Member Avatar for ~s.o.s~

Happy Holidays everyone :) Wish I could be there to help celebrate. Instead, I'll just drink a beer for you.

Member Avatar for vegaseat
1
206
Member Avatar for cgib

Sounds like the M$ DLL is not located in one of the directories in your PATH environment variable. Most likely it should be in c:\windows directory or one of its sub-directories (system32?).

Member Avatar for Fbody
0
73
Member Avatar for mikabark

Its not necessary to actually change the current working directory. [URL="http://www.daniweb.com/code/snippet216812.html"]See this code snippet[/URL] for example how to do that.

Member Avatar for Ancient Dragon
0
181
Member Avatar for abdalla crash

Go to the store and buy it then. We won't help you get pirated copies of software.

Member Avatar for assis1313
0
236
Member Avatar for TheGhost

The functions you are seeking is [URL="http://msdn.microsoft.com/en-us/library/ms997537.aspx"]Windows Hooks[/URL]. Just include <windows.h> and you will get their prototypes, as well as declaration of BOOL and other win32 macros/defines.

Member Avatar for Ancient Dragon
-1
110
Member Avatar for bobbyross

[QUOTE=sweetyyy;1126172]i want the answer for a program wap to accept data dere we have to count number of characters,words,lines i am waiting for reply[/QUOTE] We don't do homework. You do the work, You post the code, You ask questions about what You do not understand. We will help with that …

Member Avatar for WaltP
0
205
Member Avatar for khaled.s

Q1: The program does not do any integer math -- its all floats, and may floats can not be represented exactly. What makes you think there are any errors in the computations? Here are the results I got [quote] Please enter the value of x1: 1 Please enter the value …

Member Avatar for Ancient Dragon
0
137
Member Avatar for ballistic
Member Avatar for glenc70

allocate it [code] class MyClass { // blabla }; int main() { MyClass* pClass = new MyClass; } [/code]

Member Avatar for Narue
0
98
Member Avatar for deetlej1

The asserts on lines 30 and 38 will not work because the value of [b]t[/b] is the julian date so it will equal the specified value in the assert statement only on the very first iteration of the loop. you could do something like this on line 17 of the …

Member Avatar for deetlej1
0
161
Member Avatar for arsenal_fan

>>which statement is executed after returning from the recursive call. Line 45, then the loop continues, but at that point the value of [b]i[/b] is the value of [b]length[/b] - because lines 39 and 40 advance [b]i[/b] to the end of the output string before doing any recursion.

Member Avatar for Ancient Dragon
0
136
Member Avatar for chankya

>> From were Money Comes??? Many people think it comes off a money tree. And the plastic cards everyone in USA seems to have today have made paper money less useful. I assume many other countries such as UK also has simpliar experience with plastic.

Member Avatar for GrimJack
0
245
Member Avatar for heredia21

why do you need to ask us -- just run the program and find out for yourself what the output is.

Member Avatar for Ancient Dragon
-1
70
Member Avatar for Kombat

line 12: that will only read one character, not the entire string. Call fgets() if you want to read the entire line, including spaces [icode]fgets(a, sizeof(a, stdin) );[/icode] line 13: Q: what is the value of variable [b]i[/b]? A: Undefined because it was never initialized to anything. line 19: %s …

Member Avatar for Kombat
0
152
Member Avatar for mrackley86

>>class MergingLists : public list AFAIK a template can not be used as a base class to non-template c++ class.

Member Avatar for mrnutty
0
181
Member Avatar for anthony5557

After closing the file on line 20 you need to clear fstream's error before opening it again. On line 21 add [icode]address.clear();[/icode] If that does not fix the problem then more than likely the file is not where you think it is. If it's not in the current working directory …

Member Avatar for WaltP
0
103
Member Avatar for tetron

I get the same behavior. I have a Windows 7 64-bit computer with 5 Gig RAM. I also just tried the resize() method and that doesn't work either. Possibly the program can not find enough consecutive memory for that size. Code::Blocks doesn't like that either -- it throws an error.

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

I though you said the company already gave you the DLL??? [quote]the company has provided me with a header file and lib file and ofcourse the dll file[/quote] So why are you trying to recompile it? Just use the DLL that they gave you. Write your program, include their header …

Member Avatar for zaraf
0
176
Member Avatar for Lukezzz

The "problem" is more than likely too many button controls :icon_eek: Maybe you need to redesign the project so that it doesn't contain so many controls.

Member Avatar for Lukezzz
0
104
Member Avatar for Salem

My password contains the name of an artifact from one of my favorite TV shows plus some numbers. And I use the same password everwhere, including DaniWeb. I've been told that an ideal password that would be very difficult to crack would contain at least 8 characters, at least one …

Member Avatar for PedroStephano
0
707
Member Avatar for StaticX

First of all you don't want to use getline() to read a single word because getline() will read the entire line. It is better to use >> operator to read words like this: [code] std::string word; std::string filename; ... ... // open the ifstream (Note: ifstream should NOT be declared …

Member Avatar for Lerner
0
109
Member Avatar for asm2hex

why are you even using memcpy() -- what you want is strcpy(), not memcpy(). memcpy() is normally used to copy blopbs of binary data not standard null-terminated strings.

Member Avatar for JuhaW
0
118
Member Avatar for corby

call clock() before the loop starts and again after the loop ends, then subtract the two times. When the program runs fast enough the difference might be 0. In that case, put the loops into a function and call that function 1,000 times. [code] clock_t t1, t2; t1 = clock(); …

Member Avatar for corby
0
131
Member Avatar for Nicholas_Roge

When LoadLibrary() fails, call GetLastError() to get the error number, then FormatMessage() to format the error message string. [code] DWORD dwError = GetLastError(); char buf[255]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, dwError,0, buf, sizeof(buf)); cout << buf << '\n'; [/code]

Member Avatar for Ancient Dragon
0
157
Member Avatar for hawkoftheeye

The best way to approach that problem is to use <vector>, not C-style arrays. vectors are arrays which will expand as needed to contain however may data objects you want to put into it. Just include <vector> and use [icode]std::vector<int> firstArray;[/icode]. When you want to add an integer just call …

Member Avatar for Ancient Dragon
0
236
Member Avatar for Tommy2010

There are several ways to do it. One way is to parse the string one character at a time. Something like this (Note: This was not compiled or tested, so use it at your own risk). This does not solve your entire problem -- it just gets the numeric data. …

Member Avatar for Ancient Dragon
0
250
Member Avatar for Democles

Why do you have to convert those C functions at all? Just call them norally in any c++ code you want to add to the project and leave the C code in tact. In the c++ files you just have to add this: probably add it in the header file …

Member Avatar for Ancient Dragon
0
174
Member Avatar for tomtetlaw

>>The only file that is mine out of those errors is time.h name your heder file something else because your header file named time.h is most likely conflicting with the standard heder file time.h. namespaces do not resolve conflicts of file names.

Member Avatar for mitrmkar
0
500
Member Avatar for yun

>>2- c:\>path = C:\pdcurs32\win32 DON'T DO THAT! because it will destroy the entire PATH environment variable. Instead, you need to run the vcvars32.bat batch file in the compiler's bin directory to set the compiler's DOS environment variables. I copy vcvars32.bat file into the c:\ root directory to make it easier …

Member Avatar for miguelbezerra
0
2K
Member Avatar for n.utiu

Scrap that old IDE/compiler and get either free Code::Blocks/MinGW or VC++ 2008 Express. But if it's at school then you may not have a choice.

Member Avatar for abdelhakeem
0
91
Member Avatar for kymarscheng

Store the data in a hidden file or if *nix a read-only file. You could also use an encrypted file. There is nothing that will be 100% tamper-proof.

Member Avatar for kymarscheng
0
166
Member Avatar for sidra 100

name your class something else because [b]string[/b] is already a class in <string> header file. line 10: That sure is a waste of time to call strcpy() with an empty string. All you have to do is this: [icode]s[0] = '\0';[/icode] line 25: delete the [b]string::[/b] part because its not …

Member Avatar for sidra 100
0
123
Member Avatar for the_caesar

google for them? [b]UNICODE[/b] means the program is being compiled for UNICODE strings, such as using wchar_t instead of char. _x86_ means the processor is one of the 80x88 family of processors (Intel or compatible). _linux should be fairly obvious (os name). As for the other flags, they will depend …

Member Avatar for Salem
0
82
Member Avatar for Dizzzy
Member Avatar for mitrmkar
0
315
Member Avatar for Diode

[QUOTE=chandangang;761787]please explain your code[/QUOTE] getch() returns 0 when one of the special keys is pressed, such as one of the Function or arrow keys. When that happens the program has to call getch() again which will return the key code of the key that was pressed. The reason for this …

Member Avatar for hsp700
1
4K
Member Avatar for alcay

In a loop only display a certain section of the string at one time. Like this, where str is std::string with the contents you want to display [code] for(size_t i = 0; i < str.length()-9; i++) { cout << '\r' << setw(10) << str.substr(i, 9); Sleep(100); } [/code]

Member Avatar for Ancient Dragon
-2
83
Member Avatar for clutchkiller

If you want to program Windows Forms why in the world would you want to use DirectX???

Member Avatar for VilePlecenta
0
90
Member Avatar for sid78669

There are two main problems: 1) >> friend ostream &operator<<(ostream &os, const Puzzle& p); The last parameter should be passed by reference, not by value. Also change that in the *.cpp implementation file. 2) in Puzzle.h you need to declare the namespaces, such as [code] #include <fstream> using std::fstream; using …

Member Avatar for Ancient Dragon
0
156
Member Avatar for owenb

Welcome to DaniWeb. [QUOTE=owenb;1121269]I'm constantly getting into trouble by chosing options that I have no idea of what they do or what they are for.[/quote] That happens to me too :) [QUOTE=owenb;1121269] Presently I'm making a mess trying to concoct a network using Win2K and WinXP . Soon I may …

Member Avatar for Ancient Dragon
0
18
Member Avatar for Covinus

See [URL="http://www.winprog.org/tutorial/menus.html"]this tutorial[/URL]. I suspect your problem is in the *.rc file.

Member Avatar for downtimedk
0
515
Member Avatar for CFlower

Weeeeeeelllllllccccccoooooommmmmeeeee! Hope you enjoy your stay here.

Member Avatar for Ancient Dragon
0
14
Member Avatar for ibuguser

>>Any ideas what is it that I'm missing? Yes -- if you are using MS-Windows or *nix operating systems than that will not work because your program can not change the memory values of memory it does not own. You can't just plug some random memory location into your program.

Member Avatar for gerard4143
0
147

The End.