15,300 Posted Topics
Re: [URL="http://msdn2.microsoft.com/en-us/library/ms686714.aspx"]TerminateProcess[/URL], but it might leave the computer in an unstable situation. | |
Re: Sorry but we are not in the business of doing people's homework assignments for them. | |
Re: Use ifstream to open and read the integers from a text file into an array. Your program should have a loop that will read a single integer and insert it into the next available index of the array. I'm sure your text book has examples of how to do something … | |
Re: Since you have a c++ program use c++ fstream class instead of C's FILE and associated functions. This is not very complicated to do, it just takes a little planning on what you want the file contents to look like. [code] float bill = 12.32; // $12.32 ofstream out("subscriptionbill.txt"); out … | |
Re: Not generally -- you can use a union something like VARIANT structure in MS-Windows VB. But otherwise the function must already know the data type. | |
Re: we have already gone over this problem[URL="http://www.daniweb.com/techtalkforums/post349069.html#post349069"] here[/URL]. | |
| |
Re: you don't need the [b]j[/b] loop. Just delete line 10 and increment it in line 14. Don't forget to initialize [b]j[/b] in line 5. [edit]Just like Fox showed[/edit] | |
Re: just add .0 after the const as in this example and it will be ok [inlinecode] double microsoft=4294967295.0; [/inlinecode] | |
Re: not clear what a1 b1 c1 ... represents. | |
Re: I agree with Salem -- it looks ok the way you have it. Putting it all on one line of code only saves band-width, paper and ink. Does nothing at all for the compiler or program speed. | |
Re: Karan: I really don't know VB that well, but don't you have to put the ip address in quotes? [code] ds.tables(0).rows(0).item(0)=ds.tables(0).rows(0).item(0).tostring.replace(ds.tables(0).rows(0).item(0), "http://172.13.15.65/test12/service.asmx") [/code] | |
Re: I all depends on where you live. If you live in Southern California, $200K/year is barly enough to live on. But if you live where I do in the middle of the nation you can live comfortably on 1/4th that. | |
Re: Post code -- I can't see your monitor because my eyes are not that good. ;) | |
Re: strcmp() compares two strings and returns an integer that indicates whether string1 is less than string2, the same as string2, or greater than string2. For example [code=c] char string1[] = "John"; char string2[] = "Mary"; int n = strcmp(string1, string2); // 0 return value means the two strings are the … | |
Re: Is it a C or C++ program? Do you know how to open and read text files? If you do, then just read each line and compare the first two characters with the country code. | |
Re: I like it too and suppose that is true for anyone with something less than perfect eyes. | |
Re: It means you have declare the same sqlca object in both *.cpp files. If you want to use the same object in both files use the [b]extern[/b] keyword in one of the two files, like this: [inlinecode]extern struct sqlca sqlca[/inlinecode]. You should use some other name for the object -- … | |
Re: you can use the [URL="http://msdn2.microsoft.com/en-us/library/system.string.compare.aspx"]compare[/URL] method | |
Re: the subject of this thread is confusion -- subject says win32 but you are using *nix os :-/ You can't use win32 api functions in *nix. | |
Re: strcmp() only works with NULL-terminated charqcter arrays -- it does not work with binary data or strings that are not null terminated. Other than that, post your code to illustrate what you want to do. | |
Re: First you need to learn how to properly format your program -- that is one of the sloppiest format methods I've seen in a long time. Here is an example Notice that you should use spaces very plentifully to make your program easier to read. Curly braces go on a … | |
Re: The problem is mis-matched braces '{' and '}'. delete line 119. what is the semicolon doing on line 1? | |
Re: >>It doesnt work... what does that mean? what are some of the errors? | |
Re: depends on the operating system. MS-Windows: use win32 api functions FindFirstFile() and FindNextFile() | |
Re: I would assume 8088 since its a little newer than 8086. | |
Re: >>I keep getting segmentation faults when running this program. Could anyone help me with this? Yes -- get a clean compile before attempting to run it. your compiler should not create an executable file if it encounters syntax errors, but some older compilers will. | |
Re: If the database.txt file is like most other text files in most cases you will just have to rewrite the whole file in order to change just one word. But, if you just want to change one word with another word of the same length you could first locate the … | |
Re: you will probably have to use one (or more) of the [URL="http://msdn2.microsoft.com/en-us/library/ms682087.aspx"]win32 api console functions[/URL]. I haven't done it myself, but a little research in the link I provided will probably do what you want. | |
Re: it means there is no overload >> operator for the data type of variable [b]file[/b]. what is [b]file[/b]. please post more code for more in-depts examination of the problem. | |
Re: you might submit this in the C code snippets board :) | |
Re: srand() seeds the random number generator, you should call srand() one time only and near the top of main(). Most of us use the time() function as the paramter to srand() [code] int main() { srand(time(0)); } [/code] | |
Re: YES -- YOUR COMPILER WILL CREATE THE EXE FILE. TELL US WHAT COMPILER AND OPERATING SYSTEM YOU ARE USING. (Please don't use all caps like that because its like you are screeming at us, and I know you don't talk like that to your friends so why screem at us … | |
Re: >>in c++ or VC++ VC++ is a compiler, not a computer language. found [URL="http://www.velocityreviews.com/forums/t286134-how-to-convert-char-to-binary.html"]this[/URL] with google | |
Re: are you talking about [URL="http://subversion.tigris.org/project_packages.html"]this[/URL] ? | |
Re: In C you can write your own strcmp() by comparing each character of the first string with each character of the second string. If the length of the two strings are not the same then they are obviously not the same thing. If they are the same length then you … | |
Re: I wouldn't touch those torrents with a 10-foot pole! How do you know they are safe to install on your computer? For all you know those files are flooded with viruses, worms, etc. Its only legal to share files if the original autor gives you permission (e.g. license) to do … | |
Re: fgets() is always better than scanf() because fgets() will not accept more characters than will fit in the buffer. But neither scanf() nor fgets() will meet the requirements of your assignment. You need a function that will get only one key at a time from the keyboard so that your … | |
Re: iterate through the list until the current node has the same address as the initial list pointer. | |
Re: >>pz help me out Sure, if you tell us what's wrong with the code you posted (other than being horribly formatted) | |
Re: NodeType (line 10) has not been defined so your compiler has no clue what it is. | |
Re: you probably will want to use a nice GUI package designed for gamming, like DirectX. | |
Re: variable [b]a[/b] should be declared as char* [code] char* a; [/code] | |
Re: I removed the smily and added the line numbers to make it a little easier to read the code. Without actually compiling your program my guess is that the compiler doesn't like the open/close parentheses in line 16. And the keyword [b]void[/b] in line 18 should be removed if it … | |
Re: I hope you don't expect anyone to read that stuff you posted :-O | |
Re: serial ports, and programs that monitor them, only know about bytes of data on the port, they know nothing about what kind of data it is except monitoring programs can detect ascii text characters. If you send binary data then they can only show you the hex values, not the … |
The End.