112 Posted Topics
Re: 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 == … | |
Re: 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. … | |
Re: 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. … | |
Re: 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... | |
Re: [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. | |
Re: [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. | |
Re: Try [URL="http://msdn2.microsoft.com/en-us/library/ms685032.aspx"]this[/URL] It can help you. | |
Re: [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 … | |
Re: 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] … | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: [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 … | |
Re: 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. | |
Re: 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! | |
Re: [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 … | |
Re: 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) { … | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: @ Salem congrats for such a good and complete reply. | |
Re: [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++ … | |
Re: [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 … | |
Re: 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 … | |
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. … | |
Re: [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 … | |
Re: [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? | |
Re: [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. | |
Re: 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 … | |
Re: Check for stick keys n Fn key also. | |
Re: [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 … | |
Re: [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 … | |
Re: >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, … ![]() | |
Re: 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] ![]() | |
Re: [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] … | |
Re: MFC is slower, try WIN32 SDK it is dificult to write but faster... | |
Re: u cant change font of a dialog box on the fly, well u can try subclassing ur controls and thn processing WM_SETFONT msg. | |
Re: 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 … | |
Re: You mean whether Disck1 or Disck2 is inserted?? :cheesy: then you probebly need a magician insted...! :eek: :mrgreen: | |
Re: [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 … | |
Re: [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) … | |
Re: 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. | |
Re: 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 … | |
Re: >>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 … | |
Re: >>What's the difference between MS-Dos program and Windows program ? None if they work :twisted: | |
Re: 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 … | |
Re: are u working on a command line app?? try this [code] while(1) { if (((str[i] = getch()) == '\n') { break ; } else ++i; } [/code] | |
Re: 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] | |
Re: Is it the complete code? or somthing else is also there. |
The End.