15,300 Posted Topics
Re: We are not going to do your homework for you because that will teach you nothing. Give it a try, post the code you have written, then ask specific questions about what you don't understand. | |
Re: > apart from seeing technical words I do not understand, What didn't you understand? | |
Re: There probably isn't anything you can do about it, you are attempting to run a program compiled with a 30-year-old compiler for MS-DOS 6.x and Win95 in a modern operating system. DOSBox tries it's best to be compatible, but is not the same as the original MS-DOS. If you can, … | |
After changing my password I clicked the Edit Curriculum Vitae link and got the error "Oops! We don't know who you are ...". I clicked the back button and it returned me to my profile page. Apparently either one of two things happened: (1) after changing my password I was … | |
Re: [Here](http://bytes.com/topic/c/answers/218908-why-stdprn-not-defined-under-windows)'s a thread on the same topic. You can open a printer port by opening "lpt1:", but that assumes the printer is attached to the LPT1 port on the computer. Most modern computers today don't have such a port, printers are attached either by USB or wifi. In that case … | |
Re: Microsoft IDE can generate some pretty huge inline functions which consume a lot of stack space. | |
Re: Compare the parameter list of the function on line 18 with what you are trying to do on line 107. The number of parameters on line 107 must be the same as on line 18, and of the same data types. line 18: why is totalFine a parameter to the … | |
Re: Get [MySQl++ class library](http://live.dadanini.at:8980/mysql/downloads_html/api-mysql++.html). | |
Re: SOCKET shold be an int, not char because it's value can be a lot larger than what an char can hold. The file that contains SOCKET declaration is probably not reachable to the \*.c file or there could be an #ifdef around it. | |
Re: The function doesn't make much sense. For example, line 15 is unreachable, If line 5 is false then the only other option is for line 8 to be true. This is a simplified version of your function int find_index(int num,int Niz[],int index){ if(num == Niz[index]) return index; find_index(num,Niz,index++); return -1; … | |
Re: Try attending all the classes, reading your text book and doing all the exercises in your book. Then you can post specific questions here at DaniWeb along with the code you are trying to write. | |
Re: Did you write GetFloat()? Post it's source code so that we don't have to guess what it does. | |
Re: Open the file in append mode the write a line to it. The os will put the new line after the last line of the file. See the a+ flag [here](http://www.cplusplus.com/reference/cstdio/fopen/). | |
Re: c or c++? read all the words into an array of strings then use either C's qsort() function or c++ sort(). If you are required to write your own sort routine then you can't use either of those functions. in that case, google for "sort algorithms" and you will find … | |
Re: Read the previous post -- some of the colors are already in that post and they are all defined in windows.h. Console programs have very limited colors, the same as old MS-DOS 6.X from 30 years ago. | |
Re: This question has been asked and answered over a million times. Why don't you just use google to get your homework done. ![]() | |
Re: Since it's text mode and not GUI a better looking progress bar is probably not possible. | |
Re: Here[Click Here](http://lmgtfy.com/?q=rock+paper+scissors+c+program) you go. | |
Re: c++ is probably the most used by good game developers, but it's not the easiest. IMO the easiest would be VB.NET because it's graphics are much easier than other languages. I'm not a game programmer, but if I were I'd spend a lot of time [here](http://www.gamedev.net/forum/11-game-programming/) and on google. >where … | |
Re: you didn't post the loop, but you need to declare a counter before the loop starts then increment it every time a positive integer is encountered inside the loop. Only after the loop finishes should you display the final count. | |
Re: When the file fails to open it means one of two things: (1) you mispelled the name of the file, or (2) the file isn't in the same folder as where the program is running. Questiion 1: Write the data out in a different format. write() just writes out the … | |
Re: Because after you enter a number from the keyboard you have to press the <Return> or <Enter> key. That key, '\n' remains in the kayboard buffer until the next input is made. In the case of another number, cin skips all leading whitespace characters (space, newline, tab, and backspace) then … | |
Re: line 11 is wrong. There is no such command as c:\Computer. | |
Re: To do it in either C or C++ you need to read some tutorials about socket programming. There is a difference between MS-Windows and \*nix sockets, so you first have to determine which platform you are writing for. [Here](https://www.google.com/#q=c%2B%2B+socket+tutorial) are some google links that you might find helpful. | |
Re: short and long are two of the numeric data types (char, short, int, long, float and double). Only char has a guarenteed size, which is 1 byte with a range of -127 to 126. The size of all the others is compiler-dependent, so you have to look in the compiler's … | |
Re: I usually use the macros in tchar.h to make programs UNICODE friendly. If you search MSDN for the string function it will tell you what macro to use from tchar.h. For example, [strcmp() becomes _tcscmp()](http://msdn.microsoft.com/en-us/library/e0z9k731.aspx), and for string literals use the _TEXT macro, such as `_TEXT("Hello World");` There are no … | |
Re: Try this: Your function is exiting the loop after the first iteration whether the username and password are found or not. int POSConsole::Authenticate(string _userID, string _password) { bool failedLogin=false; int returnValue=0; _password = Encrypt (_password); //Encrypt user enter password to compare with vector for (int index = 0; index < … | |
Re: Another option is to remove the L in front of the two string literals. | |
Re: You need to post a couple lines from the file so we can see how it is formatted. But generally you would want to read each field into it's appropriate structure element. The easiest way to do it is calling fscanf() instead of reading the file one character at a … | |
Re: The while loop beginning on line 28 needs brackets { and } because there are more than one statement within the loop You don't need the if statement on line 26, so you can just delete that line. while(konduktor->p_next_num !=0) { cout << konduktor->num; konduktor = konduktor->p_next_num; } Now, to … | |
Re: This is C# forum, not java. For java questions post in the java forum. And ... do not hijack someone else's thread to ask your question but start your own thread. | |
Re: It doesn't work because it never saves the data to the file. | |
Re: I have both windows 8.1 and windows 7 on the same homegroup network and they each share printers and folders with each other. Most are wired, but one is wifi. | |
Re: It looks like main() is calling the wrong function. insertIntoTable() instead of insertValuel() IMO insertValue() is too complicated, paramitizing the sql like that is not necessary. sprintf(sql,"INSERT INTO table(id,text) VALUES(%d,\"%s\")",1,randomText.c_str()); Now with that simple line call sqlite3_exec(), as shown in [this 5-minute tutorial](http://www.sqlite.org/quickstart.html). | |
Re: How many years did you say you have to write/test that program?? | |
Re: the value of SIzE is 4, the initial value of counter is 0. So SIZE never equals (counter+1). The value of counter never changes inside the loop. >how is the right way to do it? Increment counter somewhere inside the loop but outside the if statement, most likely place is … | |
Re: How do you expect the thread to wait until it does something? You can't have it both ways. What's supposed to happen when GetClipboardData() returns NULL? You need to put a Sleep() in that loop so that other processes and threads get CPU time. | |
Re: In a M by N array, where M is the number of rows and N is the number of columns, the array has these coordinates Upper left: 0,0 Lower left: (M-1),0 Upper Right: 0,(N-1) Lower Right: (M-1),(N-1) The way I understand your assignment is to find the sum of those … | |
Re: >person.name[i] You need to index person, not name `person[i].name` | |
Re: Don't understand the problem. Do you just want to copy some bytes from the data file to a bin file? The terms "data file" and "bin file" are rather ambibuous, they are both really the same thing. | |
Re: are you linking with both libraries? | |
Re: Do you mean the sum of each column? You will need two loops to do that, the outer loops counts N columns and the inner loop counts M rows. It's almost identical to the way you would do it on paper or in an Excel spreadsheet. | |
| |
Re: Isn't that how it's supposed to work? When scrolling through a thread only the <DANIWEB> link and search bar are fixed. The other lines are also fixed when scrolling through menus. | |
Re: There are many ways to accomplish it. You could add a small item at the beginning of each line that identifies it as either client or item. fprintf(f,"Client: %s %s\n",head->client_name,head->client_last_name); fprintf(f,"Item: %s %s %f %s %f ",CurrentItem->item_name,CurrentItem->item_state,CurrentItem->item_price,CurrentItem->item_status,CurrentItem->item_price_if_not); | |
Re: You can usually find online help with most c++ functions and classes by googlein for them. In this case, google for "c++ std::string" and [this ](http://www.cplusplus.com/reference/string/string/)will be the first hit you see. Once there, click the link [(constructor)](http://www.cplusplus.com/reference/string/string/string/) Next, look down the page at Parameters and you will find this … |
The End.