1,174 Posted Topics

Member Avatar for wade2462

[QUOTE=wade2462]argument of type "const char *" is incompatible with parameter of type "LPCWSTR"[/QUOTE] See this codeproject article [URL="http://web1.codeproject.com/Tips/76252/What-are-TCHAR-WCHAR-LPSTR-LPWSTR-LPCTSTR-etc.aspx"]What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR etc?[/URL]

Member Avatar for wade2462
0
342
Member Avatar for vanalex

Your ifstream is in a fail state once you have exited the loop. To make the stream functional again, use [URL="http://www.cplusplus.com/reference/iostream/ios/clear/"]clear()[/URL], like so.. [code] // Clear out any error state bits in.clear(); // Now seekg() will work in.seekg(0, ios_base::beg); [/code] Then, don't use .eof() in a loop control, it will …

Member Avatar for vanalex
0
226
Member Avatar for azra36

[QUOTE=azra36] the call stack has following values. fwrite(const void * 0x0012ee5c, unsigned int 0x00000001, unsigned int 0x00001000, _iobuf * [COLOR="Red"]0xffffffff[/COLOR]) line 105 + 3 bytes [/QUOTE] The last parameter for fwrite() has an invalid value (0xffffffff). Make sure that you succeed in opening the file properly (using fopen()), like so …

Member Avatar for azra36
0
372
Member Avatar for lionaneesh

[QUOTE=lionaneesh]is giving segmentation error when reaching the fprintf() function ......[/QUOTE] You have a really nasty bug there, something is wrong with the following line .. [code] ... if(logs = NULL) ... [/code] Furthermore, if you fail to open the log file, then you must NOT try to fprintf() anything to …

Member Avatar for abhimanipal
0
138
Member Avatar for tomtetlaw

[QUOTE=tomtetlaw]check if the shift key is being held down when processing use input?[/QUOTE] I believe GetKeyState() will do the work, see an example of it here [URL="http://msdn.microsoft.com/en-us/library/ms646268%28v=VS.85%29.aspx#displaying_input"]Using Keyboard Input[/URL]

Member Avatar for mitrmkar
0
167
Member Avatar for arshad115

Ancient Dragon has written a snippet that you can build upon, see [URL="http://www.daniweb.com/code/snippet249201.html"]How to get size of all files in a directory[/URL]

Member Avatar for mitrmkar
0
157
Member Avatar for Kesarion

[QUOTE=Kesarion]There is still a problem with the wind function though.[/QUOTE] You might post the complete code (including main()).

Member Avatar for iamthwee
0
407
Member Avatar for darelet

[QUOTE=darelet]I think the Problem is more of C++ than it is an OpenCV one.[/QUOTE] Looking at the code you've posted, you have huge problems with memory overruns, and forgetting to delete the allocated memory (which may be hiding these overruns). One option would be to use [ICODE]vector<float>[/ICODE] for all of …

Member Avatar for darelet
0
154
Member Avatar for dgr231

Remove the [ICODE]#include "newmenu.rc"[/ICODE] from the source file. It is only to be included via the Solution/Project that you have - i.e. that file should display in the Solution Explorer. To add the file to the solution, use Project / Add Existing Item and pick the .rc file - that …

Member Avatar for mitrmkar
0
252
Member Avatar for keeda

[QUOTE=keeda] What does -Wall and -pedantic options stand for? And also as I am new to this system can you please refer me a link where I can learn more about these options?[/QUOTE] See [url]http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options[/url]

Member Avatar for mitrmkar
0
82
Member Avatar for Stevishere

[QUOTE=cscgal;1190745]Now that's just wishful thinking ;)[/QUOTE] Daniweb has a quite nice sortiment of smilies, but this makes me think that there's one missing, that would be: 'Icon Sigh', or some such.

Member Avatar for Nick Evan
0
365
Member Avatar for ssmg

A very [I]basic[/I] C++ tutorial that you might check out -> [url]http://www.learncpp.com/[/url]

Member Avatar for hypernova
0
432
Member Avatar for yongj

[QUOTE=yongj]I get an error when I put cout as a parameter.[/QUOTE] Using [ICODE]cout[/ICODE] as a parameter is OK - that's not the error. Looking at the error message, it seems that you don't have written code for default constructor of class [ICODE]Customer[/ICODE].

Member Avatar for mitrmkar
1
166
Member Avatar for Alex_

Try to implement the following [code] class Complex { ... // friend - allows access to private members friend ostream & operator << (ostream &, const Complex &); ... }; [/code]

Member Avatar for mitrmkar
0
167
Member Avatar for godflesh231

[QUOTE=godflesh231]i can't tell which part of my code is faulty as VC++ points me to this code from <xlocale>[/QUOTE] At that point, open the Call Stack window (Debug / Windows / Call Stack) - likely you'll be able to step into your own code to see the offending line.

Member Avatar for mitrmkar
0
163
Member Avatar for abhimanipal

The compiler sees that line as a declaration of a function ([ICODE]t2[/ICODE]) which takes no arguments and returns an object of class [ICODE]test[/ICODE].

Member Avatar for abhimanipal
0
106
Member Avatar for jephthah

The page [url]http://www.daniweb.com/forums/misc-explaincode.html[/url] is not displaying at least for me.

Member Avatar for Dani
8
2K
Member Avatar for kourt32

[QUOTE=kourt32] i did this and it outputs only 1 file with the file name in it but i would like to output 3 so what is breaking the check ? [/QUOTE] You [I]must initialize[/I] [ICODE]count[/ICODE] to a value of your choice. It is NOT initialized to zero by your compiler.

Member Avatar for mitrmkar
0
104
Member Avatar for freemanirl
Member Avatar for freemanirl
0
230
Member Avatar for Spiderpig085

There is no mention of what a [ICODE]Collectable[/ICODE] represents. Then it looks like your classes need to be inheriting from [ICODE]Collectable[/ICODE] in order for the allocations/assignments to work.

Member Avatar for Spiderpig085
0
97
Member Avatar for new2programming

[URL="http://msdn.microsoft.com/en-us/library/zxt206sk%28VS.80%29.aspx"]Compiler Error C2259[/URL] [B]>> I cannot see why i am getting them..[/B] For future reference, it's better to post the offending code along with the error messages.

Member Avatar for Ketsuekiame
0
160
Member Avatar for boiishuvo

Which compiler are you using? Isn't it giving any warnings? The [ICODE]array[/ICODE] is a zero-sized array, you want to specify a reasonable size (a compile time constant) for it, in order to use it. Alternatively, perhaps use [ICODE]std::vector<Trader>[/ICODE].

Member Avatar for abhimanipal
0
109
Member Avatar for Violet_82

Only considering the [I]formatting[/I] of the code, consider a more readable alternative .. [code] #include<iostream> using namespace std; int main() { char letter; int counter = 0; //set the counter to 0 for (letter = 65; letter <= 122; letter++) { if( (letter == 91) || (letter == 92) || …

Member Avatar for Violet_82
0
162
Member Avatar for Roses89

[QUOTE=Roses89]i keep getting : -on line 7(i.e vector<Bid> BidList (20);) : error 7 expected `;' before '(' token -and in simulator:20 `BidList' undeclared (first use this function)[/QUOTE] The compiler does not have a clue about what a 'Bid' is at line 7. You might swap the order of the classes, …

Member Avatar for NathanOliver
0
129
Member Avatar for BLKelsey

[QUOTE=BLKelsey] Currently, LOAD GAME appears and immediately goes into the game without any "wait(n)" intervals. Why won't it work?[/QUOTE] Well, you initialize [ICODE]int countdown = 5[/ICODE], so that will cause it to bypass the for-loop altogether. PS. I recently saw; "When C++ is your hammer, everything starts to look like …

Member Avatar for mitrmkar
0
103
Member Avatar for Ana_Developer

First, open [url]http://www.daniweb.com/forums/forum16.html[/url] and there, click the area where it reads; "Databases Category (Click to show forums)" I bet you'll manage to take it from there ...

Member Avatar for mitrmkar
0
36
Member Avatar for Scu

[QUOTE=Scu]I guess it all strats from this C2653 error which speads through all my new header files.[/QUOTE] The first error that occurs is: [code] Error 3 error C1083: Cannot open include file: '[COLOR="Red"]lists[/COLOR]': No such file or directory i:\sync\sortwaternetwork\sortwaternetwork\noduri.h [/code] However, that does not match the [ICODE]noduri.h/#include <list>[/ICODE] that you …

Member Avatar for Scu
0
322
Member Avatar for Roses89

Please use code tags. Wrap all your code inside the code tags, like .. [noparse] [code] your code here [/code] [/noparse] You still have ~15 minutes to edit your post.

Member Avatar for Roses89
0
186
Member Avatar for 0x69

[QUOTE=0x69]Because I've not seen that difference documented in [URL="http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B#Constructs_valid_in_C_but_not_C.2B.2B"]wikipedia here[/URL] Maybe I looked not in that direction or do we need to modify wiki, huh ? :)[/QUOTE] That Wikipedia page links to [URL="http://david.tribble.com/text/cdiffs.htm"]Incompatibilities Between ISO C and ISO C++[/URL] where this is explained, see the section "Empty parameter lists".

Member Avatar for 0x69
0
660
Member Avatar for rai32

I believe your 'username' pointers ([ICODE]nom_usuario[/ICODE]) end up pointing to the same index of the one and only buffer you are using (i.e. [ICODE]buffer[/ICODE] indirectly via [ICODE]buffer2[/ICODE]). Try changing the code to [ICODE]malloc() + strcpy()[/ICODE] the username data instead, like so.. [code] int insertar(char* buffer2, struct lista* maestra,int count, char* …

Member Avatar for rai32
0
153
Member Avatar for moods125

I'd bet that it happens due to an [I]uncaught exception[/I] of type [ICODE]digits[/ICODE]. Hint: there is something wrong at line #72. [EDIT] Isn't your compiler giving a warning of any kind, have you checked? Note that I'm assuming that you are actually calling the [ICODE]string_to_int()[/ICODE] function.

Member Avatar for moods125
0
163
Member Avatar for pash101

You don't want to have the vector ([ICODE]mydouble[/ICODE]) declared inside the for-loop, because that gives you a fresh re-constructed vector on every iteration of the loop. So declare the vector in another scope, outside the loop.

Member Avatar for pash101
0
248
Member Avatar for coded_hitec

[B]>> My C++ is rather old but this should work.[/B] Sorry but that will not work either. Consider compiling the code that you post. Even if you are posting minimal snippets/one-liners.

Member Avatar for coded_hitec
0
111
Member Avatar for yongj

This is somewhat a guessing game without the exact code. But I'd suggest that you open the header file and scroll down to the very bottom of it, just to see that there absolutely isn't anything after the semicolon that ends the class declaration.

Member Avatar for NathanOliver
0
366
Member Avatar for thatom

Have you visited [url]http://www.neurotechnology.com/fingerprint-scanner-digitalpersona-u-are-u-4000.html[/url] Looks like there are 3 available SDKs, perhaps with helpful sample applications. Moreover, they seem to have a dedicated forum there, so that might be a good place to post questions.

Member Avatar for mitrmkar
0
212
Member Avatar for lionaneesh

[QUOTE=lionaneesh;1214245] [B][U]About Malloc[/U][/B] Malloc() is ... [/QUOTE] It is malloc (not Malloc). [QUOTE] [B][U]References[/U][/B] No references guyz ... Only one my "brain" .. LOL.. [/QUOTE] You can find the current draft standard here .. [url]http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf[/url]

Member Avatar for lionaneesh
-1
400
Member Avatar for Eternal49

Just a suggestion, maybe you'd be better off without [ICODE]strtok()/atoi()[/ICODE] altogether, using [URL="http://linux.die.net/man/3/sscanf"]sscanf()[/URL] instead. A minimum example to try out .. [code] #include <stdio.h> int main() { const char * str = "255.255.255.0"; int arr[4]; int res = sscanf(str, "%d.%d.%d.%d", &arr[0], &arr[1], &arr[2], &arr[3]); /* Did sscanf() convert 4 fields? …

Member Avatar for Eternal49
0
124
Member Avatar for lightshift

It looks like you are doing assignments (=) instead of comparisons (==), so check your if-statements .. [code] // You want to have .. if(board[x][y] == '.') ... [/code] And please use code tags.

Member Avatar for lightshift
0
252
Member Avatar for athenaabc

[QUOTE=athenaabc;1213867]I must load it in the center of client area and after there moving using keys but it doesn't work[/QUOTE] Just quickly commenting on this keyboard ineffectivity, what do the following lines do? [code] pt.x=new_rect.left; pt.y=new_rect.top; [/code]

Member Avatar for soniakhan33
0
132
Member Avatar for empror9

[QUOTE=caut_baia;1213872][code] #include <iostream> int main () { int count=0; char* str; std::cout << "Enter word: " << std::endl; std::cin >> str; for (;*str!='\0';count++,*str++) {} std::cout << count; } [/code][/QUOTE] Hmm, have you tested that? Does it work as expected?

Member Avatar for siddhant3s
0
162
Member Avatar for ohh

In freqMake(...), you allocate a new [ICODE]Node[/ICODE] but fail to initialize its [ICODE]pLeft[/ICODE] and [ICODE]pRight[/ICODE] pointers (when [ICODE]tree != 0[/ICODE]). Later on you end up using these pointers, which gives you the error.

Member Avatar for mitrmkar
0
183
Member Avatar for ziyakhan10

[QUOTE=ziyakhan10;1209445]but the final output comes out in the form of an infinite loop[/QUOTE] Adding one thing... you are writing to a file named "emp.dat" and then trying to open "emp.[COLOR="Red"]txt[/COLOR]", which presumably does not exist (?). The bad usage of .eof() does not protect you from this. You can use …

Member Avatar for ziyakhan10
0
193
Member Avatar for chialoo

Your for-loop is wrong .. [CODE] void getRaise(double pay[], int size) { // should rather be .. for(int x=0; x <size; ++x) ... [/CODE]

Member Avatar for abhimanipal
0
87
Member Avatar for ironstove

Perhaps have a look at [URL="http://www.cplusplus.com/reference/stl/priority_queue/priority_queue/"]priority_queue::priority_queue[/URL].

Member Avatar for JamesMatthew
0
166
Member Avatar for Tainor

What are the values of MOUSEDOWN MOUSEUP MOUSEOUT MOUSEOVER They must be in the range 0..3, inclusive.

Member Avatar for mitrmkar
0
132
Member Avatar for robski

[quote=g++] main.cpp:48: warning: format '%s' expects type 'char*', but argument 2 has type 'int*' main.cpp:153: warning: format '%s' expects type 'char*', but argument 2 has type 'int*' [/quote] You want to treat these warnings as actual errors and fix them. PS. The line numbers of these two warnings match the …

Member Avatar for WaltP
0
224
Member Avatar for cgalvani

Please use code tags -> [URL="http://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=true&height=400&width=680"]What are code tags?[/URL] You still have ~25 minutes to edit your post and fix the tags. Then you might try to be more specific as for your problems.

Member Avatar for mitrmkar
0
105
Member Avatar for Ancient Dragon
Member Avatar for jamesbondbest

Please use code tags. What does [code] cout << RegOpenKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run\\microsoft security",&hKey) << endl; [/code] say ?

Member Avatar for Ancient Dragon
0
99
Member Avatar for newtoc_23

The output does not really match with the code you've posted, too bad. But I suspect that something like following occurs .. [code] // You prompt for the dog's name .. cout << "Enter dog1's name: "; // Note: weight cin >> dog1->weight; // You actually typed in a string …

Member Avatar for newtoc_23
0
135

The End.