868 Posted Topics

Member Avatar for aeinstein

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 …

Member Avatar for aeinstein
0
1K
Member Avatar for invinate

[QUOTE=dubeyprateek]but i never found it a gud idea. [CODE]int i[100] = {0} ;[/CODE][/QUOTE] Why not?

Member Avatar for invinate
0
90
Member Avatar for Omher

Aren't you using the [code]extern "C" __declspec (dllexport)[/code] wrappers?

Member Avatar for WolfPack
0
227
Member Avatar for vissor3

[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 …

Member Avatar for WolfPack
0
257
Member Avatar for Tester99

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 …

Member Avatar for WolfPack
0
85
Member Avatar for mcosm1

[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 …

Member Avatar for craig999
0
100
Member Avatar for complete

[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 …

Member Avatar for dubeyprateek
0
439
Member Avatar for goldeagle2005

[URL="http://www.daniweb.com/techtalkforums/member.php?u=73381"]solodrow[/URL]

Member Avatar for >shadow<
0
189
Member Avatar for demonhunter777
Member Avatar for yuzhang

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.

Member Avatar for yuzhang
0
148
Member Avatar for achala

1. can lists or vectors passed as parameters in a function? Yes 2. can the lists or vectors be returned ? Yes

Member Avatar for Lerner
0
149
Member Avatar for yuzhang

[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 …

Member Avatar for yuzhang
0
99
Member Avatar for Kiba Ookami

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.

Member Avatar for WolfPack
0
239
Member Avatar for yuzhang

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 …

Member Avatar for yuzhang
0
169
Member Avatar for yuzhang

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 …

Member Avatar for yuzhang
0
215
Member Avatar for WolfPack

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 …

0
95
Member Avatar for tyczj
Member Avatar for iamthwee
0
300
Member Avatar for rontab68

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 …

Member Avatar for rontab68
0
164
Member Avatar for a_takavci

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 …

Member Avatar for a_takavci
0
90
Member Avatar for Free Arsenal

[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 …

Member Avatar for >shadow<
0
398
Member Avatar for cindy_16051988

[URL="http://www.daniweb.com/techtalkforums/thread44153.html"]Here [/URL] is a similar thread regarding reading an XML file in C/C++.

Member Avatar for cindy_16051988
0
232
Member Avatar for Bench

[QUOTE=Bench]although interested to know whether anyone else has seen this.. [/QUOTE] Yep. I have experienced this.

Member Avatar for Dani
0
128
Member Avatar for iamthwee

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.

Member Avatar for iamthwee
0
564
Member Avatar for degamer106

-bah- Irrelevant post. Will look further. Edit. Looks okay at first glance.

Member Avatar for Lerner
0
332
Member Avatar for babirox
Member Avatar for MIGSoft
0
420
Member Avatar for cindy_16051988

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?

Member Avatar for cindy_16051988
0
2K
Member Avatar for riscphree

[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 …

Member Avatar for riscphree
0
333
Member Avatar for stallion88

[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?

Member Avatar for Rashakil Fol
0
549
Member Avatar for tydruk

Here is a corrected version. All the info gets printed out. But I don't know about any side-effects.

Member Avatar for tydruk
0
524
Member Avatar for Dani

[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 …

Member Avatar for goldeagle2005
0
151
Member Avatar for Dani

[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:

Member Avatar for The Dude
0
363
Member Avatar for remedius

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 } …

Member Avatar for remedius
0
116
Member Avatar for Tester99

[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, …

Member Avatar for WolfPack
0
236
Member Avatar for neno14me

[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. …

Member Avatar for iamthwee
0
538
Member Avatar for Excal1502

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]

Member Avatar for Salem
0
157
Member Avatar for Roujin

[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 …

Member Avatar for WolfPack
0
257
Member Avatar for Dani

[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:

Member Avatar for goldeagle2005
0
509
Member Avatar for Asif_NSU

[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 …

Member Avatar for WolfPack
1
741
Member Avatar for HackWizz

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.

Member Avatar for Dani
0
178
Member Avatar for amnezia
Member Avatar for a.baki

[QUOTE=turkish_girl]sen de mi brütüs!tum fatih universitesi burda olsa gerek!!![/QUOTE]Greek never was my strong subject.

Member Avatar for a.baki
0
367
Member Avatar for poorstudent

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.

Member Avatar for Salem
0
130
Member Avatar for AhmedHan

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...

Member Avatar for Salem
0
141
Member Avatar for tuannie

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' ) || …

Member Avatar for Ancient Dragon
0
158
Member Avatar for winbatch
Member Avatar for rookieinC++

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; …

Member Avatar for WolfPack
0
116
Member Avatar for shdjsm
Member Avatar for tiffosi

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 …

Member Avatar for WolfPack
0
222
Member Avatar for ZenaNqld

[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] …

Member Avatar for WolfPack
0
89
Member Avatar for ZenaNqld

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 …

Member Avatar for ZenaNqld
0
148

The End.