15,300 Posted Topics
Re: See revised BubbleSort() and how Array is passed to it. [code] #include<iostream> using namespace std; #include<cstring> void BubbleSort( const char *array[] , int size ); int main() { const int ArraySize = 10; const char * Array[] = { "Toronto", "Montreal", "Alberta", "Quebec", "NewYork", "Calgary", "Edmonton", "NewJersey", "Ontario", "California" }; … | |
Re: [QUOTE=sam_daniel;287021]file operations like reading, writing etc using C language[/QUOTE] what do you want to know about them? [URL="http://vergil.chemistry.gatech.edu/resources/programming/c-tutorial/io.html"]Here[/URL] is one tutorial that I hope will help you. | |
Re: [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingadodatacontrol.asp"]Remote Data Control[/URL] | |
Re: [QUOTE=~s.o.s~;286515]When Narue said that compassion and kindness had no place in this world, I felt bad for those good humans [/QUOTE] Yes I agree with you. The world is filled with people who have compassion and kindness to other people and animals. I have little respect for people who are … | |
Re: [QUOTE=]Hmm, I always thought the last number added was ' j ' (Don't know if it's called j in US/England). j^2 = -1 [/QUOTE] that is an imagenary number. I think it is represented by the letter 'i', not 'j'. I flunked biology so I don't really know:mrgreen: | |
Re: to get rid of non-alpha characters -- use a pointer to check each char using isalpha() macro. When non-alpha char found, call movemem() to shift all remaining characters lincluding the null terminator left one byte to cover up the non-alpha character. After you get that working we cal talk about … | |
Re: first thing you need to do is rearrange the program so that it contains valid functions. Pay attention to where the opening and closing braces are located. You can not start a new function before ending the previous one. Try to align the braces as neatly as possible in order … | |
Re: do you know what a "double precision floating point" is? If you don't know what it is then look it up in the index of your text book. It should explain the different data types to you. in main() function, declare three variables of that type. Write that much of … | |
Re: Oh I see you must have upgraded to [URL="http://www.c4vct.com/kym/humor/wifeup.htm"]version Wife 1.0 ?[/URL] :cheesy: Congrats on your new baby. | |
Re: The 4th thru 7th are calculated values from all the scores in the file. You can't print them out in the case statement, instead print them out after all the rows in the file have been read. You will probably have to add another case statement to do that. For … | |
Re: The general theory of OOP is the same in all languages. Its just the implementation that is different. As you continue your VB studies you will see what are the similarities and differences. | |
Re: The first thing you need to do is get a medical degree so that you know what the he!! the program is supposed to do. You can't possibly write about something you know absolutely nothing about. What operating system do you plan to run this program on? PC, MAC, *nix, … | |
Re: In function cmdReadValues_Click() check that file_length > 0. The file in your zip is an empty file. Otherwise, I don't see any problems with that program. Just make sure you click the Write button first to generate the file. | |
Re: Computers that do not have VB6 installed need the [URL="http://www.pt.lu/comnet/desc/visualbasic.html"]runtime DLLs[/URL] | |
Re: [QUOTE=joeprogrammer;285518]I think you need to use [URL="http://research.microsoft.com/invisible/IBaseRtl.htm#_tcscpy"]_tcscpy()[/URL] to do the conversion. Hope this helps[/QUOTE] No. LPCTSTR is defined as [b]const char *[/b]. No conversion needed except typecasting to remove the const attribute. Depending upon what is going to be done this may or may not be a good idea. Example: … | |
Re: [code] if ( i > 2 ) { tempString = tempChar; row = atoi( tempString.c_str() ); } else { tempString = tempChar; col = atoi( tempString.c_str() ); } [/code] The above is much too complicated. All it is doing is converting a single character to an integer. Just simply subtract … | |
Re: I prefer classical (but don't like opera) and other pop music of my day. I hate most of the music made during the 80s and 90s, but my parents said the same thing about my generation's music too. I don't watch music videos very often but the ones I have … | |
Re: I presume SOS may not have the fast internet access we have here in USA. 50Mg can be a lot for slow dial-up modems or whatever people in India use. | |
Re: ms-windows doesn't really have shared memory like *nix. you can use [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/sharing_files_and_memory.asp"]shared memory files[/URL] or clipboard | |
Re: open() method takes a char* and you are passing a std::string class. [code] ifstream file(id[color=red].c_str()[/color]); [/code] | |
| |
Re: I don't have 2003 but this is what I found on the net [quote] 1) File->Create Blank Solution 2) Select Visual C++ Projects -> Win32 Console Project. 3) Enter a name for the project (let's say you call it TEST and put it in <directory of your choice>). 4) Click … | |
Re: variable names can not begin with a letter, must be either an underscore of alphabetical character. | |
Re: 0x30 is hexidecimal value of 48 decimal (use your scientific calculator to convert 30 hex to decimal). Adding 48 to a numeric digit will make it a printable digit -- see any [URL="http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/files/ascii.htm"]ascii conversion chart[/URL]. | |
Re: Here is everything you wanted to know about OpenG L but was afraid to ask. Just google for OpenGL and you will get lots of information. | |
Re: >>a.*pointer that is incorrect syntax -- remove the star and add class member named pointer. [code] class A{ public: int x[10]; [color=red] int* pointer;[/color] }; A a; a.pointer = &a.x[0]; [/code] | |
Re: have you posted that in the tutorials board? If not, you should to that it doesn't get lost in all the traffic on this board :) :) | |
Re: you can't use interrupts in 32-bit protected-mode programs (e.g. windows or *nix programs). Easiest way is to call os C functions and let them deal with all the dirty stuff in protected mode. If you don't know how to do that there is [URL="http://www.daniweb.com/techtalkforums/thread63061.html"]another thread[/URL] that will show you how … | |
Re: >> Is there some sort of wildcard search function in C? No >>Detailed explanation. write your own. c++ boost libraries have regexp libraries, but of course that isn't C. | |
Re: you can use getline() [code] cin.getline(some_text, 10); [/code] >>cin >> *some_text; incorrect syntax. remove the asterisk (star). | |
Re: did you read the [URL="http://www.opengl.org/resources/faq/technical/#indx0050"]OpenGL FAQ[/URL]? | |
Re: [QUOTE=iamthwee;282251]Can you post just the code here. I don't like downloading zip files in case they contains viruses and other known nasties.:cheesy: [/QUOTE] in this case, no. a zip file is better because it contains lots of files and some of them contain binary information. Besides, you should always be … | |
Re: Please post code, or ask specific question. What part(s) of those instructions do you not understand? No one here is going to do your homework for you if that is what you have in mind. | |
Re: Before you jump into windows programming with both feet, you should read [URL="http://www.winprog.org/tutorial/"]this intoductory tutorial[/URL]. | |
Re: [code] invoke ExitProcess,eax invoke PostQuitMessage,0 [/code] I think you should delete the call to ExitProcess because it will not give the windows application a chance to do proper cleanup. I believe ExitProcess is intended only for console programs. >>But there's something wrong in that GetFileSize area I don't see your … | |
Re: >> srand((unsigned) time(&t)); you don't need the argument to time() [code] srand((unsigned) time(NULL)); [/code] >>#if defined(_MSC_VER) delete the above line and the corresponding #endif. time functions and rand functions are both standard c/c++ library functions that are supported by most c or c++ compilers. | |
Re: on MS-Windows os, use FindFirstFile() and FindNextFile() to iterate through all the files in a folder. *nix has opendir() and readdir(). boost libraries have os-independent c++ classes. useing these functions you don't have to know anything about the file names or how many files there are. Just check the file's … | |
Re: please edit your post to use code tags. If you don't know how to use them you can find the instructions in the link in my signature below. | |
Re: you have to use win32 api functions. [URL="http://www.winprog.org/tutorial/"]here[/URL] is a tutorial >>How to import it from Borland to DevC++ I presume you mean Turbo C. Those programs can not be ported, requires a rewrite to use win32 api functions. | |
Re: >>who can tell me why? Use ODBC and you should be able to access that database. | |
Re: >>How do I organize the input alphabetically? there are at least two ways I can think of: 1. use a linked list, insert the new name in alphabetical order. The program will have to search all the nodes in the list to find the right spot. 2. similar to #1 … | |
Re: two problems I can see without even compiling it. 1. main() should return an integer. I know it returns 0 if no return is specified, but you should expeclitly return a value anyway. [code] system("pause"); } return 0; [/code] 2. Above is not inside any function. >>#define PI 3.14159 you … ![]() | |
Re: what operating system? Creating threads is different for each os. ![]() | |
Re: learn to use [URL="http://www.google.com/search?hl=en&q=PY2EXE&btnG=Google+Search"]google[/URL] | |
Re: >> double Points; //Point's Scored why are you using double here? Can value of Points have a fractional part (I doubt it)? I think you would be better off using either int or long. >> cin.getline(players.name[SIZE]; that should be like this: cin.getline(players[i].name, SIZE); | |
Re: Do the assignment one step at a time and it will be a lot easier. If you try to do it all at once you might wind up just getting more confused. Start with function wages(). You know that you have to have a prompt "Enter employee gross sales ( … | |
Re: XP64 ? I don't think there is such a product. I run XP on a 64-bit processor if that's what you mean. Or do you mean Vista, the next Microsoft 64-bit version of windows, and its still in beta testing so I would expect it to have bugs. | |
Re: are you using Windows operating system? If yes, your use account needs to have administrative privileges. | |
Re: OMG: do you really write your code all on one line like that!:eek: I'll bet your teacher is very proud of your coding style. | |
Re: 100,000 rows is just an average size database -- large ones have millions of rows. If you have an address in table A that is not in table B then you want to correct the address in table A. How are you going to do that? How do you know … |
The End.