15,300 Posted Topics
Re: Ohhh! I want one of those :) | |
Re: use sprintf() to format the file name [code] char filename[255]; int i; for(i = 1; i< 10; i++) { sprintf(filename,"p1%03d".state",i); printf("filename = %s\n", filename); } [/code] | |
Re: Before you can use fieldarray you have to allocate memory for it. For example: [code] // allocate enough room to store two pointers filearray = malloc(2 * sizeof(char*)); [/code] | |
Re: c++ Forms [code] private: System::Windows::Forms::TextBox^ myText; <snip> String^ str = myText->Text; [/code] | |
Re: [QUOTE=msg;454093]Thanks for your reply. So, there is not a readstring command?[/QUOTE] Nope -- in assembly language you have to roll your own. You can use C library functions, but that would defeat the purpose of you writing assembly language. | |
Re: predeclare the structure [code] typedef struct tagPerson Person; struct tagPerson { // blabla }; [/code] | |
Re: I reviewed your two thread and see that you have not answered people's questions. We are not mind readers, not is anyone here [URL="Thank You for running the software. Bye for now”,"]clairvoyant[/URL]. Would you go to an automobile repair shop and tell the mechanic "My car is broke. Fix it … | |
Re: displayObject() returns void -- that can't be used with cout. | |
Re: Just use long long or __int64 data types. One of those are supported by most, if not all, modern compilers. | |
Re: If you don't know how to calculate the SD, [URL="http://en.wikipedia.org/wiki/Standard_deviation"]read this wiki article.[/URL]. It provides some very simple examples. | |
Re: [URL="http://www.cplusplus.com/reference/stl/list/erase/"]Example:[/URL]. What specifically don't you understand about it? | |
Re: [code] const int SomeSize = 5; const int SomeOtherSize = 5; class ClassName { }; typedef ClassName SomeName[SomeSize][SomeOtherSize]; [/code] | |
Re: Move line30 up to line 29 so that it's within the else statement. | |
Re: Memory allocated in a dll must be free'ed in the same dll. Likewise, memory allocated in the application program must be realloc'ed or free'ed in that same application program. You can't allocate in one and realloc or free in the other. The reason is that they use different allocation pools … | |
Re: A library of what? Cookbooks? Music? Or just anything? Microsoft has a walkthrough to teach you the basics of using that compiler. You should read it some time. [URL="http://www.google.com/#sclient=psy&hl=en&q=vc%2B%2B+2010+express+tutorial&aq=f&aqi=g2g-o1&aql=&oq=&gs_rfai=&pbx=1&fp=6248f386b3c06fd8"]Here[/URL] are other tutorials. | |
Re: >>I wonder if is it possible to link the GPRS modem and a I/O board together? I have no clue what you mean by that. you need to be more specific about what you want to do. >>I already have a VB6 coding Then why don't you just use it? | |
Re: did you try something like this? data db 1024 * size node | |
Re: If you created the project as a DLL project then the configuration type will already be selected for you. You don't really have to do that step. At that point, just hit the Build Solution option If you don't see a Build menu option -- located just to the right … | |
Re: Neither one is selection sort. [URL="http://en.wikipedia.org/wiki/Selection_sort"]Read this[/URL] for an algorithm. The second one is not a sort of any kind because it contains errors >>for(i=0;i<=n;i++) Arrays are numbered 0, 1, 2, ... N-1. So i <= n should be just i<n | |
Re: There are litterally hundreds of examples all over the net. All you have to do is use google to find them. [URL="http://www.dreamincode.net/code/snippet2212.htm"]Here is one example[/URL]. | |
![]() | |
Re: VC++ 6.0 will work on Vista but you will get a lot of compatability warning messages. VC++ 2008 Express runs perfectly on Vista. So if you are currently using VC++ 6.0 you should upgrade to VC++ 2008. I use Dev-C++ on Vista. But you may have to add full paths … | |
Re: can you make SquareImage1 to SquareImage64 an array? Then you could do that in a simple for loop. And it might simplify other parts of the program. [icode]Image SquareImage[64];[/icode] | |
Re: operqating system? compiler? Is he printer connected directly to your computer or is it on a network ? | |
Re: I've been working on that very thing the past few days -- learning Windows Forms. You can't call c++ new operator -- instead you have to use gcnew. [code] private: System::Void toolStripMenuOpen_Click(System::Object^ sender, System::EventArgs^ e) { if( openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { try { StreamReader^ myStream; if(openFileDialog1->FileName == nullptr) return; if … | |
Re: You can do that only if you have security access rights on the target computer. Compile the program on your own computer then download it to the cgi folder on the target web server. | |
Re: free vc++ 2007 Express (google and you will find the download link). But there are others, such as Code::Blocks, also free. Neither produce 64-bit pograms, but the 32-bit programs they produce run well on 64-bit Windows 7. | |
Re: >>i'm an intern As an intern your prospects for getting full time work is retty slim because you don't even know how to read yet. Come back in about 10 years, after you have learned how to read and comprehend what you read. Geek's Lounge is not the place for … | |
Re: This thread is 6 years old! The OP has probably replaced that old computer by now. | |
Re: about cin.ignore() -- read [URL="http://www.daniweb.com/forums/thread90228.html"]this thread[/URL] function arguments are paired by position, not by name. | |
Re: put that in its own thread so that other processing can be done. In the thread put the code in an infinite loop. Call Sleep(1000) inside the loop so that the thread waiks up only once per second. Also you might want to add '\r' at the beginning of the … | |
Re: >>i dnno how to insert in without using an array Please explain more exactly. Insert a value into the array? | |
Re: >>But i wanted to know if it could be done without using string array or string functn. plainly by using any numeric datatype Yes. use modf() to split the float into integer and fractional parts. The write a function that adds together the digits of each part. Finally main() should … | |
Re: try Build-->Clean then rebuild the entire project. Correct all warnings and errors. | |
Re: >>printf("%d",a[x]); should be %f, not %d. Also put a space between the numbers [icode]printf("%f ", a[x]);[/icode] | |
Re: You can't have nested functions like you posted in [color=red]red[/color]. | |
Re: >>For example when I want to read p2DArray[511][511][845646] it doesnt say me that I am out of dimensions Well duuh! the maximum is p2DArray[511][511][1]. c++ programs don't produce out-of-bounds error messages. They just crash and burn. | |
Re: Homework??? Let's see the code you have started to solve all those problems. We are not here to do your homework for you. | |
Re: >>How many threads can be created? (I know that if there is too many, they have to wait for their turn, but is there a limit?) Windows 2000: maximum is 65,535 handles. That will include threads, files handles, GDI object handles, etc. I have not found if XP, Vista or … | |
Re: The code you posted does not contain anything that attempts to read a text file. | |
Re: line 10: int big=match[0]; That won't work because its declared as a global and vector match does not contain anything. >>void highest_range(vector<int>match, string range []) You should pass that vector by reference, not by value, so that the entire vector doesn't have to be duplicated. [icode]void highest_range(vector<int>& match, string range … | |
Re: use an OnTimer() event handler. See SetTime() and KillTimer() | |
Re: what exactly do you mean by "it doesn't work"? Compiler errors? If yes, then what are they ? | |
Re: sprintf() will do all the conversions except binary. Google for binary to decimal convertions and you will find out how to do that too. If you are not allowed to use sprintf(), such as you must write the algorithms yourself, then use google because such algorithms are very common and … | |
Re: [QUOTE=~s.o.s~;284324]Even when I was in school, we were also asked to use the same thing, not because they didnt like other compilers but because they didnt know any other compiler existed other than MS Visual Studio and Turbo C.[/QUOTE] don't your university instructors ever use [URL="http://www.google.com/search?hl=en&q=c%2B%2B+compilers&btnG=Google+Search"]google[/URL] ? But I don't … | |
Re: I just do it like this: [code] void CMfctestDlg::Sum() { UpdateData (true); this->SetWindowText("Result"); Result obj; obj.Final_Result (m_arg1, m_arg2); obj.DoModal(); } [/code] | |
Re: A simple class [code] class MyClass { public: MyClass() { x = 0; } int Add(int n) { this->x += n; } private: int x; }; [/code] A normal function outside a class might look like this: [code] struct MyStruct { int x; }; int sum(int n, struct MyStruct* s) … |
The End.