15,300 Posted Topics
Re: The problem with the spaces is not in the code you posted but the way you are getting keyboard input. You need to post that part of the program. The code you posted has a major flaw though. You don't want to check the entire size of the buffer [b]szword[/b] … | |
Re: >>is this valid Probably not. Did you run that to see what it does? You probably need something like this: [icode]pwd=$dir + '/' + $date + '/'[/icode] I assume you are doing *nix shell programming, hence the forward slashes. | |
Re: operating system? compiler? You can't do that with 32-bit os like MS-Windows or *nix without writing kernel-level code | |
Re: >>i want tell you evry body sign in this web you give the solution We all know that is a lie. | |
Re: Are you the same person as [URL="http://www.daniweb.com/forums/thread106184.html"]this one[/URL]? Not very often we get two people working on the same problem. | |
Re: That is a C program, not C++. What parts don't you understand ? | |
Re: Welcome back. [URL="http://www.daniweb.com/forums/post285483.html#post285483"]Here is your last post[/URL]. | |
Re: [URL="http://msdn2.microsoft.com/en-us/library/chzww271(VS.80).aspx"]This [/URL]c++ code also uses FileSystemWatcher | |
Re: Maybe [URL="http://www.muquit.com/muquit/software/mailsend/mailsend.html"]this[/URL] will help | |
Re: think about how would you calculate the average galles per k with pencil & paper. Given the distance and gallons its just simply [icode]average = distance/gallons[/icode] If you want the average over several tanks of gas then sum up all the gas you bought then do the division. This is … | |
Re: >>Needs me for today And when did you get that assignment? Your lack of ability to manage your time is not our problem. | |
Re: lets say you have two integers, n1 and n2 [code] open file for input read first integer into n1 start of loop to read until end-of-file read integer into n2 subtract n2 - n1 and save result in a second file move value of n2 into n1 end of loop … | |
Re: That compiler does not have unistd.h -- that is a *nix header file. There is no substitute for Windows. | |
Re: did the program catch the execption that is thrown by the constructor? That's probably what cause that error | |
Re: Since this is c++ you can use std::string's find() method to locate the colon then substr() method to extract everything after it. | |
Re: [QUOTE=technogeek_42;515099]ah i know and what is the best of the two the software developer or web developer. (opinion only)[/QUOTE] There is no [b]best[/b] because they are both needed so if you are in school you should learn both. | |
Re: >>Why we get the core file Because you made errors in the program. >>how can we debug it in unix [URL="http://www.cs.cmu.edu/~gilpin/tutorial/"]tutorial[/URL] | |
Re: you have to add ShowArray() at the bottom of the do loop in the sort function. | |
Re: Yes, you can do that. The problem is that you are doing double the work that is necessary, and its very easy to make mistakes in the extern statements between the different files. If you only have one or two variables/functions you want to declare extern then by all means … | |
Re: The constructor for student doesn't have to do anything at all with the array of courses because class course will take care of it. All student has to do is initialize its own variable [b]g[/b]. | |
Re: I would create a structure that contains a value and the count for that value [code] struct data { int value; int frequency; }; [/code] Now make an array of those structures and initialize everythig to 0. Then begin the loop you wrote on line 11. For each value in … | |
Re: If you are uisng win32 api timer event function [b]SetTimer()[/b] to start the timer then you can use [b]KillTimer()[/b] to stop it. | |
Re: Step #1: Get a Ph.D. from a good university. After you get that you will have all the knowledge you need to design and write your own compiler. Don't believe me? well, if you don't then read [URL="http://www.velocityreviews.com/forums/t281828-how-to-write-a-c-compiler.html"]this thread[/URL]. | |
Re: IMO the best was is to take college classes. If you can't do that (maybe because you aren't in college) then the next best thing is to buy a book and start reading from page 1. [URL="if(array[j]==array[i])"]Here [/URL]is a thread about the best recommended books. Then of course you need … | |
Re: variables a, b, c and d can not be input like that. Do it like this: [icode]cin >> a >> b;[/icode] You can't type the division symbol, but only the two numbers you don't need lines 10 and 11, so you might as well delete them because they are wrong … | |
Re: >>All i know is need to use constants. You have failed to tell us what the program is supposed to do so how can we help you ? >>Also under the type of ticket such as orchestra, etc how do I move the three options into more of a tab … | |
Re: You need to use your compiler's debugger to step through that code and find out what is causing the problem because it isn't apparent from what you posted. I can tell you that lines 6 and 7 will produce very very small numbers. The purpose of dividing the return value … | |
![]() | Re: You can't do it directly from c++, but if you wrote that Delphi program you can change it to get update info from the c++ program. You can set up a communications link between two programs, sort of like client/server, where c++ sends data to Dephi and Delphi uses that … |
Re: The MySQL web site has a set of C++ classes that you can use. See [URL="http://tangentsoft.net/mysql++/"]MySQL++[/URL]. There are also several ODBC c++ classes, some free and some not. Just look at [URL="http://www.google.com/search?hl=en&q=ODBC+c%2B%2B+classes"]these links[/URL] | |
Re: win32 api [URL="http://msdn2.microsoft.com/en-us/library/ms683163(VS.85).aspx"]GetConsoleCursorInfo()[/URL] | |
Re: >>please help me in developing editor same as C++ c++ is not an editor, its a computer programming language. Are you talking about the IDE of a c++ compiler such as VC++ 2008 Express ? That would be very ambitious project and if you have to ask how to do … | |
Re: naw -- it isn't necessary to clear the whole cotten picken screen. All you have to do is output '\r' to move the cursor back to the beginning of the line. This assumes you want to display the value at the beginning of the line. putting it somewhere else on … | |
Re: [b]Ma, I'm gona rip off your head and shit down your throat[/b] in the movie Dr Detroit when he is threating the town female mob boss. | |
Re: you don't call ReadFile() to read the mapped file into memory. See the examples and explaination in [URL="http://msdn2.microsoft.com/en-us/library/aa366551(VS.85).aspx"]this article[/URL]. The whole purpose of memory mapped files is to share data between processes. When Process A writes to the share memory, such as using strcpy() function, Process B will be able … | |
Re: In c++ you have the choice of using either `new` operator or `malloc()` function to allocate that memory. `new` is preferred in c++ but `malloc()` may be a better solution when you need to change the size of the array while the program is running. An array of pointers to … | |
Re: That path contains spaces, so you can't use the >> operator. use getline() instead to get the full path including all spaces. | |
Re: line 15. Wong check. You need to check argc to see if it is > 1. Then move lines 11 and 12 inside that if statement, between lines 15 and 16. line 18: EOF is an integer, not a char. So you need to redefine variable [b]c[/b] as int, otherwise … | |
Re: Hello Karinc and welcome to DaniWeb. Glad to see you aren't just lurking about any more. Very few people are born experts at anything but acquire that status through years of learning from others and many hours of practice. I've been at this for awhile now and still feel like … | |
Re: how did you tell your compiler that it needs to link with [b]d3d9.lib[/b] ? My guess is that you didn't. | |
| |
Re: Sorry, rules are rules. No one here is going to write your program for you. | |
Re: Since we can't see your monitor you will need to post the exact command(s) that you use to compile. If you are running a makefile then post the containts of that makefile. | |
Re: [b]winerys::info()[/b] contains a huge memory leak -- you allocate [b]temp[/b] with new operator but never delete it before the function ends. why is that constructor opening a file for reading then never reading anything ???? | |
Re: !a returns a boolean value which can not be incremented. | |
Re: to convert line to lower case [icode]transform(line.begin(),line.end(), tolower);[/icode] To put the string in an array [code] vector<string> array; ... array.push_back(line); [/code] | |
Re: The "form" you are talking about is probably your program's GUI window. I don't think you want to do that. Just start out by creating a standard console program. Your compiler's IDE will contain a text processor where you can type in your program. You could use Notepad, but then … | |
Re: Yes, I know how to do it. [URL="http://www.microsoft.com/express/vc/"]Read this[/URL]. to get started. | |
Re: >>isDigit misspelled, its [b]isdigit()[/b] >>i=atof(line); atof() converts a string to float, not integer. what you want is atoi() or atol(), and takes a char*, not a std::string [icode]i = atol(line.c_str());[/icode] If there is only one digit then you don't need any conversion function [icode] i = line[0] - '0';[/icode] ![]() | |
Re: If the wireless device is running a version of MS-Windows such as Mobile 5.0 then the ESSID is stored in the registry on the wireless device. If you are trying to get the ESSID from a program running on the wireless device then just read the registry. Sorry, but I … | |
Re: >>int main(int argc,char*arg=3argv) that is not valid way to declare main() because it can not have default parameter values [icode]int main(int argc,char* argv[]); [/icode] >>ow should it do the while loop [icode]while( getline(infile, line) )[/icode] |
The End.