15,300 Posted Topics
Re: >>hat should I do?help~~~~ Create the INSERT sql statement. For example: [icode]INSERT INTO table1(name) VALUES("data")[/icode] If that doesn't make much sence to you then you probably need to study SQL language ([URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=sql+tutorial&btnG=Google+Search"]tutorial here[/URL]) | |
Re: If you are going to do this kind of advanced-level programming then you really need to learn how to debug your own errors. The problem is those two defines on lines 552 and 553. Delete them. | |
Re: Use FILE* and associated functions in stdio.h then read the file. Exactly how to go about parsing the file will depend on the format of each line. You could make up your own format or use one that many other programs use, such as [quote] name=ArjunRaja password=1234 age=23 [/quote] | |
Re: The problem is [icode]#define small char[/icode]. You can't do this: [icode]int char[/icode], which is what you are doing then you say [icode]int small;[/icode] | |
Re: [QUOTE=gerard4143;1040716]You could try something like below...I [/QUOTE] That should produce an error because ' ' is not a valid escape sequence. If you don't like the default spacing then don't use tabs. Do something like this: [icode]printf("%-20s", "Hello World");[/icode] where the text string will be left-justified in a field 20 … | |
Re: depends on the operating system. *nix use opendir() and readdir(). MS-Windows use FindFirstFile() and FindNextFile(). Don't know about other operating systems. google for those function names and you will find lots of information. | |
Re: line 61 in the code you posted: That function displays random/wrong values because it is using uninitialized variables. | |
Re: [QUOTE=AceofSpades19;1041136]The warnings don't really matter, there are usually a few warnings in every application, its the errors that matter. Ruby is a scripting language and Rails is a web development library that is used with ruby[/QUOTE] Wong! Most warnings are really errors. If you don't fix them then you are … | |
Now that I have Win7 set up the way I want it, is it possible to create an image on a bootable DVD so that if (and when) my computer crashes I can just reinstall everything from that image? I seem to recall something like that was done on my … | |
| |
Re: line 32 is a string in scientific notation. The value is just too small to be represented in normal double precision, so you have to display it in scientific notation, like this: [icode] printf("%e\n", array[n]); // Here it doesnot [/icode] In the value 2.657374814e-012 the -012 tells you to move … | |
Re: Start your research by reading some of [URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=c%2B%2B+file+search+algorithms&btnG=Google+Search"]these google links[/URL] | |
Re: Why don't you solve them yourself? You won't learn anything by cheating. | |
Re: blud: you need to invest in a blue-ray read/writer so that you can put all those movies on dvd instead of keeping them on your hd. | |
Re: You should not be using tabs but setw() method. Tabs may display differently on different computers/monitors. I think setw() will give you a consistent appearance. | |
Re: >>which c++ compiler is easy n best? Those are two exclusive requests -- the best compiler/IDE is not necessarily the easiest to use. If you want ease of use then you will probably have to sacrifice power. Dev-C++ is probably the easiest IDE to use, but IMHO VC++ 2008 Express … | |
Re: It returns gibberish because when that NextTag() returns the array [b]radial[/b] is destroyed, which invalidates tags[1]. What you need to do is allocate memory for the text. Then main() will have to delete[] that memory when its done with it. [code] tags[1] = new char[strlen(radia1)+1]; strcpy(tags[1], radia1); [/code] Another way … | |
Re: If the item numbers are consecutive (no missing numbers) then you don't need to keep them in an array. Just use the array index of the text array as the item number. One way to do it is like this: [code] std::string item; // get item number, which is ended … | |
Re: Deposit $10,000.00 USD in my PayPal account and I will write one for you :) | |
Re: Initialize the array by flooding it with all 0s. [icode]char title[10] = {0};[/icode] | |
Re: variable ptrA needs to have three stars [code] #define maxrows 2 #define maxcols 5 int main() { double a[maxrows][maxcols]; double ***ptrA = malloc(maxrows * sizeof(double*)); int i,j; for(i = 0; i < maxrows; i++) { ptrA[i] = malloc(maxcols * sizeof(double*)); for(j = 0; j < maxcols; j++) { ptrA[i][j] = … | |
Re: I don't know how its done, but [URL="http://www.daniweb.com/techtalkforums/thread62511.html"]here[/URL] is an example | |
| |
Re: >> line 20: fflush(stdin); fflush() is only guaranteed to work with output streams, not input streams. >> line 21: gets(p[i]) Two problems: [list=1] [*] never ever use gets() because it may write beyone the bounds of the array, causing your program to crash. Use fgets() instead. [*] Variable [b]p[/b] is … | |
Re: lines 8 and 11 of the first code are using uninitialized variable [b]ch[/b] | |
Re: win32 api was written in C so that it can be called from lots of other programming languages. >>Does it mean I have to sell OOP for procedural C or wha Yes, unless you want to use something else, such as MFC (not free) or wxWidgets (free). | |
Re: The functions in time.h aren't at all difficult to use -- you just need to read about the different functions. time() -- returns the current time in seconds since 1970. It returns the time in an unsigned int (size_t) variable. When you have to get the current time this is … | |
Re: Post some of the compiler error messages. >>void main() NEVER EVER use void main() [URL="http://www.gidnetwork.com/b-66.html"]Here's why[/URL] | |
Re: "convolute a gaussian". I looked up the word convolute in wiki, and for computer science you need a Ph.D. in math in order to understand it. Well, I barly passed 1st grade math :) | |
Re: You can't call *.cpp files, but methods and functions that reside in the files. If you want to call IBM.cpp then call one of the functions or methods that is coded in that file. | |
Re: If you want the 2d vector to contains either strings or ints, then maybe you need to create a template class. | |
Re: Read your textbook about how to write a c++ class. There are also millions of tutorials on the web you can read. Don't be so lazy and do a little research and reading. | |
Re: There are options in VC++ to produce several kinds of assembly code from the C or C++ code. I don't use NetBeans but I would imagine it has an option too. | |
Re: I noticed it was a little slow today but nothing like it has been in the past. | |
Re: My guess is that you are using the wrong sql statement. If you are using Oracle then you need to read [URL="http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/clob10g/handlingclobsinoraclejdbc10g.html"]this article[/URL] and sample program. | |
Re: SaveFileDialog() doesn't save anything -- it's just a dialog box that lets you nagivate to the folder where you want the file saved and give the file a name. After SaveFileDialog() returns to your program your program must get the complete path/filename from the SaveFileDialog class, open the file for … | |
Re: We don't have the definition of your queue class so can't really tell if some of those are right or wrong. 2. Probably wrong. You are not supposed to delete the item from the queue. Just retrieve it. There is probably another way to get the item out of the … | |
Re: This is a very simple programming problem which can be done with only 8 lines of code! All you have to do is create an array of 255 ints then use each letter of the string as an index into the array. So if you have 'A' then all you … | |
Since its no longer possible to use code tags without line numbers, suggest you change quote tags to retain spaces and tabs like code tags. I'm a little surprised that was not how quote tags should have worked anyway. | |
Re: Suggestion: Create a web site using MySQL database that stores member information. | |
Re: Step 1: Create a console project. File --> New --> Project. Project types: select Win32. Templates: select "Win32 Console Application". Near the bottom of the screen enter a project name and location. Then press Ok button. Step 2: On this window just click Next Step 3: Application Settings window: Uncheck … | |
Re: the output you posted is wrong. Here is the correct output. Had you bothered to compile and run that program you would have seen it too. [code=text] The contents of the array are : 1 5 0 2 4 -2 3 3 0 4 2 2 5 1 4 [/code] | |
Re: I would use a typedef [code] #ifdef SIZE_32 typedef __int32 inttype; #else typedef __int64 inttype; #endif int main() { inttype a = 0; } [/code] | |
Re: You created a windows gui project, not a windows console project. Start again, but this time create the right kind of project. | |
Re: line 17 is probably the wrong way to determine if the file is empty or not. What you should do is seek to end of file then get the file position. [code] instaffile.seekg(0, ios::end); size_t sz = instaffile.tellg(); if( sz == 0) { staffid = 1; return; } [/code] The … | |
Re: [QUOTE=csurfer;893789][B]I just hope I could key in the same number of characters from keyword in 30 sec[/B].At least that would help me to code in hell lot of code in minutes ;)[/QUOTE] And with a lot more bugs to fix :) | |
Re: I've heard about it but have never seen it played. It appears to be a simple form of American Football, minus all the body protection. Ouch! | |
Re: The main reason parents don't want their minor-age kids to have sex is because sex between opposites produces babies. For a girl that will rune your life forever and ever. And guess who will get stuck with the job of raising the bastard kids? Yes, you got it -- your … | |
Re: Spanking? Absolutely -- beat the living hell out of the little crumb snatchers :) But if you do that your kids will hate you for the rest of your life. |
The End.