15,300 Posted Topics
Re: using vista home and ie7: I see the same behavior. Sometimes its two or three threads repeated over and over. | |
Re: how in the world did you think you can stuff that structure into a short int ? I'd like to wear a size 32 pants too but my fat butt won't fit into it. Perform the checksum calculation on the individual members of the structure. | |
Re: [QUOTE=cscgal;641390]No but you can go into your control panel and always see all of the reputation you've received[/QUOTE] I can only see the first 15 reps. When I click on the arrow in the upper right corner of the rep box it blanks out the box and I see nothing, … | |
Re: don't use scanf() because it won't let you put spaces in the file name. [code] char filename[255]; // max possible length on MS-Windows printf("Enter a file name\n"); fgets(filename, sizeof(filename), stdin); // truncate the '\n' if it exists if( filename[strlen(filename)-1] == '\n') filename[strlen(filename)-1] = 0; file = fopen(filename, "a"); [/code] | |
Re: look at argv[0] -- some compilers put the full path in there. | |
| |
Re: Just look at all the programs that are running on your computer. Probably 90% of them are written in C or C++ languages. >>webdesigning -- C/C++ is not very popular for that. Java and PHP are probably the two most popular languages. | |
Re: >>g++-4.2 memJpegDecoder.cpp That is attempting to compile the *.cpp and create the executable program a.out. From the error message I assume that *.cpp file doesnot contain a main() function, which is required of all c and c++ executable programs. | |
Re: Depends on the compiler -- most c++ compilers will complain about that. | |
Re: >>How would I go about making the second payload exactly the same as the first payload? You can't without reallocating the entire string because the way the arrays are declared there is no room for expansion. BTW: neither apayload nor received_payload are null-terminated strings. When you initialize character arrays like … | |
Re: you could convert one character at a time. start out by multiplying the result by 10 add the character and subtract '0', similar to how you would convert an integer [code] char inputstr[] = "123.45"; float result = 0.0F; // convert 1st character result = (result * 10) + inputstr[i] … | |
Re: >>when we run the interface and click the button excute the programing code"proto1.exe" but the result false Do you mean ShellExecute() return 0? My guess is that you need to add the full path to the proto1.exe program. Example: [icode]ShellExecute(this->m_hWnd,"open","c:\\mydir\\proto1.exe","","", SW_SHOW );[/icode] | |
Re: you can use fscanf("%f", ...) to input the values from the file. Use a counter integer to count 8 fscnaf(). [code] int i; float nums[8]; FILE* in = fopen("filename.txt"); for(i = 0; i < 8; i++) { fsscanf("%f", &nums[i]); } [/code] | |
Re: I don't think [icode]*p = new Piece[/icode] should be any concern because it won't affect [icode]Board b;[/icode] at all. | |
Re: yes, but can't help you unless you post the code. Most likely its the way you opened file2. Look at [URL="actorname[strlen(actorname)-1] ="]this description [/URL]of the second parameter. If you want to delete the previous contents of file2 then you have to add the ios::truncate flag in the open() method. | |
Re: My first thought was to use the time functions in time.h standard header file, but the problem with that is that the earliest date that can be use by those functions is 1970, which clearly will not work for your program. So you will have to do the calculations yourself. … | |
Re: Most files that are opened for writing are opened for exclusive use -- that denys write access by other programs and processes, and sometimes denys read access too. [quote]So in between the 1mins times can Program B copy its content and after copying delete all the content in AAA.txt?[/quote] No. … | |
Re: >>A calculator program built using MFC dialog box You can not use the express version of those compilers to compile that code because those compilers do not support MFC. You have to buy $$$$ one of the other versions of the compiler. | |
Re: line 30: [b]valar[/b] is not a member of CARD. What you want here is [b]value[/b], not valar. line 32: what is SUIT ? If it is anything other than POD (Plain Old Data) type or an enumeration then the ocmparison on line 32 can't be done like that because you … | |
Re: line 21: you can delete it because the file pointer is already at the beginning of the file when it is opened. line 26: you don't need the ios::in flag because ifstream is an input stream. All you need is [icode]infile.open( filename.c_str());[/icode] >>Is there a way to use an array … | |
Re: We need to see actual code. I suspect the problem is actually somewhere else in your program, quite possibly trashing memory somewhere during the first file read operation, or failing to delete memory when necessary making your program gobble up all the computers resources. Look at Task Manager while your … | |
Re: Hello Casper. Glad to see you joined DaniWeb. I don't know diddly squat about PHP or web development, so you will rarely see me in any of those boards. But don't hesitate to help others when needed. | |
Re: I've seen similar problems with Windows XP and earlier versions, and the only way I could resolve the problem was to reboot the computer. I'm using Vista Home now and have not had that problem with this version of Windows. | |
Re: Welcome to DaniWeb. Sorry to hear about all those problems. If you post questions/comments in one of the technical board I'm certain you can get pointers and a lot of help. | |
Re: First you have to declare a structure that is each node. If you search for "linked lists" you will get lots of examples, such as [URL="http://cslibrary.stanford.edu/103/"]this tutorial[/URL] by Stanford University. | |
Re: line 22: The ios::ate flag does nothing for input files. Its use it intended for output files. line 19 and 26: memblock should be unsigned char because a binary byte can be any value between 0 and 255. line 33: can't do that with a binary file. cout expects a … | |
Re: this is a lot simpler [code] int main(int argc, char **argv) { int sum = 0; int i; for(i = 1; i < argc; i++) sum += atoi(argv[i]); } [/code] | |
Re: 1) What kind of project did you create? console, win32 windows, something else? 2) what libraries did you try to link with? | |
Re: 1. Yes. just use standard stream file i/o to sequentially read the file one line at a time. Look for the tag name, when found look for the value on that line. 2. Yes. The programmer has to write the server program in such a way that it knows what … | |
Re: [QUOTE=Smalls;623622Cons] [LIST] [*]No support for DVD drives lacking firmware region coding [/LIST] [/quote] That's funny because DVD works in my machine. [QUOTE=Smalls;623622Cons] [LIST] [*]New monitor needed to view Hi-Definition content [/LIST] [/quote] And why is that Vista's fault? My old anolog tv doesn't work with hi-def either, so is that … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/chzww271(VS.80).aspx"]Here [/URL]is how to monitor file changes in MS-Windows operating systems. You can't do it the way you are trying to. | |
Re: 1) GetData() must be declare [b]virtual[/b] in each class for that to work. 2) [icode](arr.front())->GetData();[/icode]. Don't call the GetData() method like that because the front() item in the array will most likely not be the item that was most recently added. push_back() puts the item at the tail of the … | |
Re: As you must have found out, the exit(0) function exits the entire program, not just the function in which it appears. It would appear you have the wrong notion about how to return from a function in C or C++ [code] int foo1() // This function will return the value … | |
Re: >>I wonder if it is possible to call the function void OneFunction() Don't know myself. Instead of asking us if it is possible, why don't you just try to do it yourself? If you did, what were the results? | |
Re: just google for them -- you can even buy degrees without taking one course :) | |
Re: >>i know its a lot, but i have the rest of my life to wait for answers ^^ Then the first place to ask all those questions is google. Some of those questions depends on the operating system and compiler. google first, then come back for answers to what you … | |
Re: Are you talking about the digits of a number stored as text? Like this: [code] #include <iostream> #include <string> #include <wchar.h> #include <cstdlib> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { std::wstring iobuf; cout << "Enter a number\n"; getline(wcin,iobuf); wcout << iobuf << "\n"; int n = _wtol(iobuf.c_str()); cout … | |
Re: There is no portable way to do it because the number of bytes occupied by a function may vary by compiler and even within the same compiler from one compile to another. Most compilers will generate the assembly code for a program. | |
Re: I don't have a problem with gay marriage. I have heard many straight people say that gay marriage will destroy the concept of triditional marriage between a man and a woman. Nonsense. I've been married (to a woman) for 46 years and nothing gays do will diminish my marriage. Why … | |
Re: what compiler are you using? I used VC++ 2008 Express and could not duplicate your problem. The only problem I had with your code is that [b]hinstDLL[/b] was undefined. I even added cout statement in MyClass constructor -- it displayed ok too. The dll file you did not post was … | |
Re: [QUOTE=Luckychap;637192]hey its easy try it. read characters from file in a buffer until u encounter a dot(.) save that buffer which is your sentence. What say...?[/QUOTE] But what about other sentence separators such as ? and ! How about a sentence that spans lines. In the case of the second … | |
Re: Which Borland compiler do you have? graphics.h and associated lib are not supported by modern 32-bit compilers, only very old MS-DOS compilers such as Turbo C and Turbo C++. | |
Re: [QUOTE=jephthah;637122]the function that would be helpful for you here, i think, is STRTOK [/quote] Nope -- just use fgets() as previously suggested. No need to read the file one character at a time just to find line terminators because that's doing it the hard way. | |
Re: when the loop at line 196 finished the value of [b]currentPtr[/b] is NULL, so the loop starting at line 209 can not execute. | |
Re: In the event handler for the exit button send a WM_QUIT event message to the program's main thread. More information is [URL="http://www.gamedev.net/community/forums/topic.asp?topic_id=135109"]discussed here[/URL]. | |
Re: Hello World isn't displayed because nobody is logged in. And that's probably why the file doesn't get created too. try putting the *.exe in the AllUsers startup folder C:\Documents and Settings\All Users\Start Menu\Programs\Startup I think it will then get run after someone logges into the computer. | |
Re: The [b]extern[/b] keyword is used to tell the compiler that a data object is declared in a different *.cpp or *.c file (code unit). Its required for data objects but optional for function declarations. For example, you have two *.cpp files named A.cpp and B.cpp. B.cpp has a global int … | |
Re: I started in 1980, a few years before I retired from the USA military. | |
Re: Have you tried [URL="http://www.lvr.com/usb.htm"]USB Central[/URL] ? | |
Re: [QUOTE=sreein1986;635737]Hi I want to tell one thing to daniweb if i click mark as solved when my thread completed and it asked again mark as unsolved it's not good, disble Mark as unsolved please and also after solved problem disble reply buttons also Just It's my suggestion only[/QUOTE] The "Mark … |
The End.