868 Posted Topics
Re: Since this is a trivial program, there is not much to do to make the program efficient. You could initialize the variables as they are declared, as you said, and yes it is possible to do that with multiple variables too. However, although this may vary on who you work … | |
Re: [QUOTE=dubeyprateek]but i never found it a gud idea. [CODE]int i[100] = {0} ;[/CODE][/QUOTE] Why not? | |
Re: Aren't you using the [code]extern "C" __declspec (dllexport)[/code] wrappers? | |
Re: [QUOTE=CStallion]But then the message "Press any key to continue..." won't appear... so I'd just have to make an extra line of code like [inlinecode]cout<<"Press any key to continue..."; cin.get();[/inlinecode][/QUOTE] If you are using Visual Studio, pressing Ctrl+F5 will give you that message in your system locale, without you having to … | |
Re: Release or Debug or any other custom configuration you have setup. By default you get the Release or Debug Configuration. This is needed only if you use the /project switch. If you use only the /solution switch, you can just give the solution file and the solutionconfig name and all … | |
Re: [QUOTE=mcosm1]Can someone please help. Recently after my brother has been using the computer and entering BIOS settings, my computer will not boot correctly. The power on light is green and everything seems on, but nothing will come up on the screen. I think, possibly that my brother has changed the … | |
Re: [QUOTE=complete]What are some of the pluses and minuses of MFC? I think it is better to do a lot of things that are complicated without it. Any thoughts?[/QUOTE] Pluses and Minuses against what? You can get an idea in [URL="http://www.daniweb.com/techtalkforums/post208988-14.html"]this[/URL] reply. It would help if you state what you are … | |
Re: [URL="http://www.daniweb.com/techtalkforums/member.php?u=73381"]solodrow[/URL] | |
Re: I would use something like [CODE]if (sock!=INVALID_SOCKET) { if(send(sock,s,(int)strlen(s),0)==SOCKET_ERROR) { printf("Sendfailed.%d", WSAGetLastError()); } } [/CODE]and see. | |
Re: 1. can lists or vectors passed as parameters in a function? Yes 2. can the lists or vectors be returned ? Yes | |
Re: [QUOTE=yuzhang]Hi all: According to the library, recv() will return a zero if the socket is closed, and a SOCKET_ERROR if the socket meets an error. But when I closed my socket (at least I think I closed it properly), recv() returned a SOCKET_ERROR other than zero. Wondering why? Thank you … | |
Re: Looks like you haven't added the second file to the project or have added both files to the project. Remove the first file, and then add the second file. At anycase it is not a bug in your program, but the way you have setup the project for execution. | |
Re: If send is successful I think it returns the number of bytes sent at that time. YOu can use that and compare with the number of data bytes you wanted to send to see if an error occured or not. GetLastError or WSAGetLastError is only used to get detailed error … | |
Re: Now there are two or three places in your code where the socket may return INVALID_SOCKET, e.g the call of socket, and where the Winsock functions may fail, e,g gethostname(). So why don't you use the GetLastError() function at these places to get the error number when that happens? Then … | |
Hi, I am trying to configure a Fedora Core 5 Server for my home network. Can you please tell me if there is a way, and possibly the steps or links, to share the DVD Read/Write Drive installed in the server so that I can burn CD/DVDs across the network … | |
Re: Try [CODE]p->setLeft( root->getLeft() );[/CODE] and likewise. ![]() | |
Re: Use a function like sprintf or snprintf to create the string you want to display, and then input that string to the MessageBox function. The sprintf function gives you the ability to embed an integer inside a string, by using the %d format specifier. It is similar to printf, the … | |
Re: program a client to make a connection request from a single server, and display the server name or IP if the connection is granted, and logout. Use it to make connection requests from each computer in the LAN. You will get a list of computer names where the server is … | |
Re: [QUOTE=cscgal]As a result of this and other incidences, Narue has decided to step down as moderator :( Despite her "tell it like it is" attitude, she is very knowledgeable and has been a great asset to our community. With that said, I don't want this to go any further.[/QUOTE] Oh … | |
Re: [URL="http://www.daniweb.com/techtalkforums/thread44153.html"]Here [/URL] is a similar thread regarding reading an XML file in C/C++. | |
Re: [QUOTE=Bench]although interested to know whether anyone else has seen this.. [/QUOTE] Yep. I have experienced this. | |
![]() | Re: Search for CreateProcess [quote=Platform SDK] BOOL CreateProcess( LPCTSTR lpApplicationName, LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCTSTR lpCurrentDirectory, LPSTARTUPINFO lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation ); [/quote] in the Platform SDK Documentation or MSDN site. Edit: Okay [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp"]here[/URL] it is. ![]() |
Re: -bah- Irrelevant post. Will look further. Edit. Looks okay at first glance. | |
Re: I Say ...who published my answer sheet. Hik Hik zzzzzzzzzzzzz. | |
Re: So do you want a DLL that converts MP3 to and from Wav format? Or Do you want to know how to call a DLL that you already have? | |
Re: [QUOTE=riscphree] The problem I am having with with the algorithm of determining how to get the lowest common denominator in order to be able to easily add the fractions. Someone suggested using Euclid's algorithm, but I don't know exactly how that would work in this situation.[/QUOTE] Why on earth do … | |
Re: [QUOTE=iamthwee]What's the top prize again? How do I enter :rolleyes:[/QUOTE] I think it is 29 cans of soda. Shall we share? | |
Re: Here is a corrected version. All the info gets printed out. But I don't know about any side-effects. | |
Re: [QUOTE=prof.thakur]well this method is not to be followed to delete large files or folders at once u can delete it within sec. just create another file/folder with the same name which u want to delete.[/QUOTE] I don't think you can create a file or folder with the same name in … | |
Re: [QUOTE=cscgal]I'm in NY and the server is down in Texas[/QUOTE]Looks like the butterfly effect to me. ;) Glad the server is up anyway. I actually started reading a book during the downtime. :cheesy: | |
Re: This is a long shot, but looks like name mangling to me. Are these lines included in the header file of the DLL file? [code]#ifdef __cplusplus // If used by C++ code, extern "C" { // we need to export the C interface #endif ....// Your header #ifdef __cplusplus } … | |
Re: [QUOTE=Tester99]Hello, Could someone help me, I don't know how to build project with Visual C++ toolkit 2003, that project has made with [I]Visual Studio .NET 2003 or is this generally possible.....[/I] Any suggestions?[/QUOTE] If you mean, you want to build a .vcproj file or .sln file from the Visual Toolkit, … | |
Re: [QUOTE=iamthwee] I would rather use the Sleep function than the stuff from <time.h>... [/quote] Use the [CODE]clock[/CODE] function. If you use the [CODE]sleep[/CODE] function you will have to implement a clock function from scratch. [QUOTE=iamthwee] 1. Use a rather hackish console display with <windows.h> commands 2. Use win32 -yuck 3. … ![]() | |
Re: Don't you have to give a constant value for size? The program does not even compile in my compiler. [code]string names[size];[/code] | |
Re: [QUOTE=Roujin]i bet you work for microsoft. [/QUOTE]DevCPP is not a microsoft product. [QUOTE=Roujin]what is it with people just because something is old doenst mean its not useful. [/QUOTE]He didn't say it is not useful, he said it is a bad compiler. And rightly so. I don't think it supports much … | |
Re: [QUOTE=Comatose] I know that I get added to people's MSN Messenger, and IM's requesting help on a personal level ...[/QUOTE] Heck, I wouldn't complain if some chick added me to MSN. I am enabling my contact options right now...:mrgreen: | |
Re: [INLINECODE]PostQuitMessage() [/INLINECODE]only posts a [INLINECODE]WM_QUIT [/INLINECODE]message to the message loop. The message loop may or may not receive the [INLINECODE]WM_QUIT[/INLINECODE] message as soon as the [INLINECODE]PostQuitMesasge(0)[/INLINECODE] is called. Also as DestroyWindow does the destroying of the child windows, resources ...blah blah, there maybe a delay in that too. But I … | |
Re: I start reading from the end of the thread. So this problem does not occur to me. :cheesy: There is a very handy button that takes you right to the last post of the thread. | |
Re: [QUOTE=turkish_girl]sen de mi brütüs!tum fatih universitesi burda olsa gerek!!![/QUOTE]Greek never was my strong subject. | |
Re: Those are C Codes alright. But for the solaris environment. [url=http://www.eternallyconfuzzled.com/tuts/avl.html]Here[/url] is a more generic implementation, taken from Narue's homepage. | |
Re: Nothing seems to be wrong at first glance. Maybe there is a semicolon out of place in a header file or any other source file where DebugTest is declared. That is the most possible cause that comes to my mind... | |
Re: I think it should be this. [code] if ( ( StationID[Record] != 'A' [COLOR=Red]&& [/COLOR] StationID[Record] != 'a' [COLOR=Red]&& [/COLOR] StationID[Record] != 'B' [COLOR=Red]&& [/COLOR] StationID[Record] != 'b' [COLOR=Red]&& [/COLOR] StationID[Record] != 'C' [COLOR=Red]&& [/COLOR] StationID[Record] != 'c' [COLOR=Red]&& [/COLOR] StationID[Record] != 'D' [COLOR=Red]&& [/COLOR] StationID[Record] != 'd' ) || … | |
| |
Re: What about this one? It is a small modification of your second program. It displays 99 or 100 numbers but there is no guarantee that all the numbers from 0 to 99 will be output. [code] //* Randomizing numbers…*// #include <stdio.h> #include <stdlib.h> int main() { srand( time(0)); int i; … | |
Re: Look for the [code]itoa[/code] function. | |
Re: Well unless you are reading and writing at the same time, there shouldn't be any problem. That is if it cycles like Process A - Write File Process A - Close File Process B - Read File Process B - Close File Repeat from above There are mechanisms by the … | |
Re: [code] if (StrokeCount == 5 ) { cout<< "You are on Par Way To Go!!"<<endl; cout << endl; } else if (StrokeCount < 5) { Par = 5%StrokeCount; cout <<" You are "<< Par <<" under Par" << endl; cout << endl; } else if (StrokeCount > 5 ) [COLOR=RED] … | |
Re: Nobody laughs at nobody's code. At least nobody who remembers that they were also new to this once. What does this program do now? [code] #include <iostream> #include <ctime> using namespace std; int main() { char Club =' '; char Choice =' '; srand(time(0)); cout << " Would You Like … |
The End.