112 Posted Topics

Member Avatar for Tiger909

Try this [CODE] #include <iostream> using namespace std; void main() { int x, y; int z=0; do{ cout << "Please Enter a positive number\n"; cin >> x; if(0 == x || 1 == x) { cout<<"Please try again with number other then 0 or 1" <<endl; } } while((0 == …

Member Avatar for invisal
0
169
Member Avatar for Max_Payne

You are not moving the cursor at right place before you do a "cout" Ycan move cursor by including one more function in your point class in point.h add a member funtion in the point class [CODE] void gotoxy(int , int ) const ; [/CODE] in point .cpp add following. …

Member Avatar for Max_Payne
0
588
Member Avatar for kv79

What did not work ? LoadLibrary GetProcAddress function1() or FreeLibrary ? If LoadLibrary did not work, look in keep dll in the same folder of exe. if GetProcAddress did not work try dumpbin -exports <path>\myfile.dll in command prompt of visual studio to check if function1 is exported from the dll. …

Member Avatar for kv79
0
209
Member Avatar for tootypegs

CreateDirectory or mkdir can certenly create the directory. Do you just want to craete the dir structure? Howz about attibutes like hidden or read only? Also security atrribute? Seems it is a good amount of work...

Member Avatar for Ancient Dragon
0
108
Member Avatar for Max_Payne

[QUOTE=Max_Payne;496039]I would appreciate some help in this thread: [url]http://www.daniweb.com/forums/thread101965.html[/url][/QUOTE] The right place to ask about this is [url]http://www.daniweb.com/forums/thread101965.html[/url] The code is too big to read. Why dont you zip and upload the project and indicate the problem function. It will be easy to debug.

Member Avatar for dubeyprateek
0
218
Member Avatar for navi17

[QUOTE]When we create object from a class, it is created on stack or heap. [/QUOTE] It is created in stack (in C++ unlike C#)until and unles you go for dynamic creation.

Member Avatar for Jishnu
0
93
Member Avatar for hellokitty88

Try [URL="http://msdn2.microsoft.com/en-us/library/ms685032.aspx"]this[/URL] It can help you.

Member Avatar for Jishnu
0
123
Member Avatar for ENG ISE student

[CODE] do { if(strcmp("COMPUTER", word) || strcmp ("COMPUTERS", word))//looks for both computer and computers in file { fout.open ("filename2");//open output file fout<<word;//prints the word in the output file } // read the word here from the input file in 'word' }while(word);//curently it is a bad loop[/CODE] is not doing the …

Member Avatar for Ancient Dragon
0
107
Member Avatar for invisal

EDIT : Narue has already answered. I want to add just one more thing. Member fucfions are not just stored by names internealy. Name of a member function of a class is would be Class::MemberFunction() not just MemberFunction() (unlike C). It helps in function overloading when used with [URL="http://en.wikipedia.org/wiki/Name_mangling"]Name Mangling[/URL] …

Member Avatar for dubeyprateek
0
373
Member Avatar for shayantani

Did you try this shell API [URL="http://msdn2.microsoft.com/en-us/library/bb762169.aspx"]SHFormatDrive[/URL] . It is the simplest one. There is not other documented API apart from SHFormatDrive(). Only drawback is it is interactive. If you do not want user to interact and you are targetting Wk3 you can use WMI classes see [URL="http://msdn2.microsoft.com/en-us/library/aa390432.aspx"]this[/URL]. You can …

Member Avatar for dubeyprateek
0
309
Member Avatar for toolmanx

Hello toolmanx, Two things [QUOTE]My CreateFile works fine and returns a good handle. CreateFile sucessfully loads the file location into memory. GetLastError tells me that CreateFile worked and my memory allocation has been successful. I also tried a call to GetFileSize which worked fine before calling ReadFile. [/QUOTE] 1) Never …

Member Avatar for Salem
0
532
Member Avatar for yangchen60

virtual void drive() = 0 is a "pure virtual function" you can search with this keywod [URL="http://google.com"]here[/URL] or [URL="http://live.com"]here[/URL]

Member Avatar for dubeyprateek
0
76
Member Avatar for shizu

[QUOTE=shizu;492741]Hihi.. I would like to ask about ::FindWindow's function.. I execute a program call ABC.exe.. I have coding like below.. HWND window = ::FindWindow("ABC", NULL); but I get the window value is NULL.. may I know what is my mistake..?? I had execute the ABC program, suspose it can return …

Member Avatar for dubeyprateek
0
326
Member Avatar for Jishnu

Narue has pointed to a great article. To udestand this article you may need Debugging tools for windows. [url]http://www.microsoft.com/whdc/devtools/debugging/default.mspx[/url] However, these are non-documented APIs you should avoid calling from user mode application.

Member Avatar for Jishnu
0
142
Member Avatar for seyetotto

What does your input file contain? The program looks OK to me. However, it can not print anything if it does not have input file. lolz!

Member Avatar for vmanes
0
113
Member Avatar for yangchen60

[QUOTE]*broom is a pointer located on c's adress in memory ? Is that right?[/QUOTE] Broom is a pointer pointing to c's adress in the memory. Take this example. Lets say address of c be 0x8000 and address of broom be 0x5000. If you go and read 4 bytes at 0x5000 …

Member Avatar for dubeyprateek
0
66
Member Avatar for stubBuddy

Did you typedef LPCTSTR to flStr and OptStr? If not your function should look like [CODE]void checkOptions(LPCTSTR flStr,LPCTSTR OptStr) { int iArg = 1, x = 0, i = 0; TCHAR eMsg[0x200]; i = _tcslen(flStr); for (x = 1; x < i; x++) { if (_tcschr(OptStr, (flStr)[x]) == NULL) { …

Member Avatar for stubBuddy
0
176
Member Avatar for revenge2

Hi revenge2, I looked in your code. It works as expected. I don't understand what do you mean by "flashing". You may like to add followin lines before return. I am using Microsoft C++ therefore I used [CODE]_getch[/CODE] you may use anything which blocks the execution and let your program …

Member Avatar for Ancient Dragon
0
130
Member Avatar for eranga262154

[QUOTE=eranga262154;492621]Hi all, I want to find the number of words in a rich edit control. There is no direct class member to do this. So I think if I can count the number of word break and line brake then it is easy. But it is also not easy. On …

Member Avatar for WolfPack
0
898
Member Avatar for Tell Me
Member Avatar for tonyaim83

Do you see anything in event log? It may be because you are missing any dll or version conflict in dlls. You may like takeing memory dump with loder snaps. [QUOTE=tonyaim83;492767]Hi.. I m working on Windows-Xp and building my project on Dev-cpp. The program compiles properly and i have also …

Member Avatar for dubeyprateek
0
105
Member Avatar for degamer106
Member Avatar for lifei

[QUOTE=lifei;480008]hi..currently i am doing my final year project regarding pure tone audiometer. i had found the tone with different frequencies and amplitudes.. however, i dont know how to load in my program. Can anyone help me by teaching me how to load and play those tones by using visual c++ …

Member Avatar for vmanes
0
112
Member Avatar for Tales

[QUOTE=Tales;336357]I have a little annoying problem and I really need help. I need to convert a char* to TCHAR* and I can't... I have tried everything and nothing seems to help... TCHAR text1[ ] = ""; char *key; key[0] = 'a'; key[1] = '\0'; text1 = _T(key); //Does not work …

Member Avatar for dubeyprateek
0
258
Member Avatar for bigben09

Hi try with this.... may be it can help you. [code] #include "stdafx.h" #include <iostream> #include <ctype.h> #include <iomanip> using namespace std; int main() { char movie[50]; float adult_ticket_price, child_ticket_price; float adult_ticket_sold, child_ticket_sold; float percentage_of_gross_amount_donated; cout <<"Enter The Movie Name: "; cin.getline( movie, sizeof(movie)); cout << ""; cout <<"Enter The …

Member Avatar for WaltP
0
130
Member Avatar for dubeyprateek

I am a C++ programmer, I have a good hands on C, C++ and WIN32, however i don’t know MFC much. I am willing to learn C# and i am looking for few guidelines. It will be a great help if anyone can tell me how to start with it. …

Member Avatar for sedgey
0
193
Member Avatar for gabs

[QUOTE=gabs;293339]hi! I'm kind of new to this site, but I saw some of your guys posts, and man, you are brilliant. so I hope someone can help me as well. I am doing a vc++ program, and I'm using many comboboxs. how can I tell between them? I mean, I …

Member Avatar for gabs
0
104
Member Avatar for kosmitek

[QUOTE=kosmitek;293551]Player throw bone and he going on board about some number of fields[/QUOTE] So,where is the problem? Is it not working?

Member Avatar for dubeyprateek
0
113
Member Avatar for jvignacio

[QUOTE=jvignacio;291075]It can be any numbers and as many numbers and digits... like 1 2 3 = 123 or 34 45 56 67 = 34455667 know what i mean ?[/QUOTE] What do u think about intiger overflows? int can store maximum of 2,147,483,647.

Member Avatar for dubeyprateek
0
123
Member Avatar for andrax

i guess, when u are creating a brush u need to distroy it also using DeleteObject, currently it seems to be a leak. [code] else if(map.isSelect(x,y)) FillRect(hdc, &rect, CreateSolidBrush(RGB(0,0,255))); [/code] is it working?? i guess u need to select brush, by using SelectObject. or else u can use GetSysColorBrush i …

Member Avatar for andrax
0
219
Member Avatar for assmaster
Member Avatar for invinate

[QUOTE=invinate]ok, quick question for those who know the standard well. when is a variable (and array and class object) set to 0 by default (all elements, all members) in C++. i know that if it's global it should be (is it?). are there any other cases?[/QUOTE] static also, well u …

Member Avatar for invinate
0
90
Member Avatar for pench

[QUOTE=pench]hai freinds, this is pench.i have finished my psot gradution(MCA) in S.K.University.i am new to this group.plz help me if post any queris in forum. queris: 1. what is the difference between New and Malloc or Calloc in C[/QUOTE] new actually calls malloc internally, wat it does it first allocate …

Member Avatar for SpS
0
624
Member Avatar for ok555

>1 Am I using new/delete correctly? yes, u are using it fine. >the size returns 4.. and the len returns 9, all my text is there.. >but why is the size of the array smaller then the ammount of text? did i do something wrong? no, y did it right, …

Member Avatar for iamthwee
0
243
Member Avatar for arrogant
Re: trie

may be this can also help u [URL="http://www.codeproject.com/useritems/BST_Template.asp"]http://www.codeproject.com/useritems/BST_Template.asp[/URL]

Member Avatar for iamthwee
0
265
Member Avatar for geez85

[QUOTE=geez85]Hey, i just got alil problem. Im trying to create a 2d array with a size of [1000][1000]... [code] double variable[1000][1000] = { 0 }; [/code] its compiles fine but when i run the program, it just crashes...is the array too big?? the maximum i can get is [300][300]...any ideas??[/QUOTE] …

Member Avatar for dubeyprateek
1
4K
Member Avatar for complete
Member Avatar for dubeyprateek
0
441
Member Avatar for deineMutti

u cant change font of a dialog box on the fly, well u can try subclassing ur controls and thn processing WM_SETFONT msg.

Member Avatar for dubeyprateek
0
1,000
Member Avatar for nanodano

May be u can use these functions they are easy to use.. [CODE]hThread = _beginthread (ThreadProc, uiStackSize, pParam) ; [/CODE] It's just a bit simpler and is perfectly fine for most applications. This Thread function has the syntax [CODE]void __cdecl ThreadProc (void * pParam) ; [/CODE] After the _beginthread function …

Member Avatar for dubeyprateek
0
115
Member Avatar for gopi-krishna

You mean whether Disck1 or Disck2 is inserted?? :cheesy: then you probebly need a magician insted...! :eek: :mrgreen:

Member Avatar for dubeyprateek
0
83
Member Avatar for yuzhang

[QUOTE=yuzhang]Consider a line of simple C code: fopen("C:\\project\\test1.dat","r"); it "directs" the program to the directory where it can find the file from which it will read. My question is under what circumstances, I may write fopen("test1.dat","r") instead? Does the program need to be in the same folder / directory as …

Member Avatar for yuzhang
0
292
Member Avatar for breal

[QUOTE=breal]How to Sort a MultiDimensional Array in C ???? in ascending order ?[/QUOTE] If your are trying to sort a MultiDimensional array of character you can see this. this is simple bubble sort [code] #define SIZE 100 void Sort(char arr[SIZE][SIZE], int NoOfRows) { int i=0,j=0 ; char temp[SIZE] ; for(i=0;i<NoOfRows;++i) …

Member Avatar for dubeyprateek
0
116
Member Avatar for jack999

hi looking at ur requierment, u can write in swap funtion like [code] for(int i=0; i<=4; ++i) { arr[i] = arr[i] + arr[9-i] ; arr[9-i] = arr[i] - arr[9-i] ; arr[i] = arr[i] - arr[9-i] } [/code] hope this should work for u.

Member Avatar for Lerner
0
180
Member Avatar for puppy

hi There are two things first [code] const double *highest = a; [/code] this line says highest is a pointer to a costant means u cant change the content highest is pointing to, next [code] if (a[i] > *highest) { *highest == a[i]; // "==" ?? } [/code] removing that …

Member Avatar for dubeyprateek
0
109
Member Avatar for derangedone

>>derangedone ucan use arrays with dynamic memory allocation. [code] main() { float n; int i; int d,f; char c; float p; int *Queue=NULL ; //declare a pointer Menu(); printf("Enter the letter for your choice:\n"); c = GetChoice(); while (c != 'Q') { if (c == 'I') { printf("Enter number of …

Member Avatar for Lerner
0
207
Member Avatar for thare

>>What's the difference between MS-Dos program and Windows program ? None if they work :twisted:

Member Avatar for thare
0
129
Member Avatar for HelpMeImLost

cosider this, but i think even after implimenting this re defition of class u will not able to solve all of ur problems, although it contains answer of both of ur questions. [code] class Employee { private: int idNum; char name[20]; double rate; public: Include an additional member function to …

Member Avatar for HelpMeImLost
0
142
Member Avatar for neeludhiman

are u working on a command line app?? try this [code] while(1) { if (((str[i] = getch()) == '\n') { break ; } else ++i; } [/code]

Member Avatar for Salem
0
92
Member Avatar for poorstudent

may be this will help you. [URL=http://www.cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html]http://www.cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html[/URL]

Member Avatar for Salem
0
131
Member Avatar for AhmedHan

The End.