15,300 Posted Topics
Re: [QUOTE=The Dude;641318]I mi$$ the past more than anyone here knows!! Quality was MUCH BETTER,life was much simpler......... I love using my Commodore 64very much!! Too much garbage in todays world........[/QUOTE] You are obviously the minority -- Bill Gates didn't become the richest man in the world because of MS-DOS 6.X … | |
Re: Welcome to DaniWeb Bones. I remember those days too where I worked in the military. The first computer I ever saw was housed on three floors of a 5-story concrete building (1963). Now it can be fit in the palm of my hand. | |
Re: p is an array of 100 pointers. On line 101 you are attempting to assign a double to each array element. If that's what you want, then change the array on line 97 to an array of 100 doubles instead of an array of pointers (just remove the star). Then … | |
Re: You have to write a windows GUI program and add dialog boxes with edit controls. [URL="http://www.winprog.org/tutorial/"]Tutorial here[/URL]. | |
Re: This might actually result in an infinite loop because it keeps expanding the file as the loop progresses [code] #include <fstream> // and other headers string temp_string; char result; long pos; fstream studfile; studfile.open("student.dat", ios::in | ios::out); // Is this correct? while (getline ( studfile, temp_string) ) { pos = … | |
Re: Probably because java is a memory hog, it runs slower because its an interpreted language, and C/C++ languages let you get much closer to the hardware than java does. | |
Re: [URL="http://www.daniweb.com/forums/forum16.html"]Here is one[/URL] Exactly how to write the scripts (programs) depends on what programming language you want to use. C, C++, Python, PHP, C#, VB, etc. etc. ???? | |
Re: [URL="http://www.daniweb.com/forums/thread90228.html"]See this thread[/URL] how to avoid system("PAUSE"); | |
Re: You will have to post the code. The file probably isn't in the directory where you think it is, so you might have to provide the full path to the file. | |
Re: [code] return( strcmp(tag, buff, l) ) ; /* why he uses 3 parameters? I think it should be 2 parameters in "strcmp" ? */ [/code] That line is definately incorrect -- strcmp() only takes two parameters, not thread. Maybe it should have been strncmp() which has 3 parameters ? mystrcmp() … | |
Re: You might begin by reading [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_faq"]DaniWeb's Mission Statement[/URL]. Then navigate through each of the forums, reading the introductions at the top of each forum page. They will tell you what each of the forums are about. Also don't forget to become familiar with DaniWeb [URL="http://www.daniweb.com/forums/faq.php"]FAQ[/URL] and [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]Community Rules[/URL] | |
Re: Here's how to do it in c++, which does not use fopen() or anything else from C's stdio.h [code] #include <string> #include <fstream> using namespace std; int main() { string filename; char path[_MAX_PATH]; string iexename = "Services.exe"; GetCurrentDirectory(_MAX_PATH, path); filename = path; filename += "\\"; filename += iexename; // open … | |
Re: Don't double post the problem in multiple threads because it only causes confusion. I'm closing this thread so that the discussion can continue in the other thread. | |
Re: depends on what you consider "reasonable rates". Bill Gates might considere $1 Million/year reasonable, but since I doube you are a multi-billionaire that problably isn't quite in your price category. Why don't you just google for cell phones to see what you can come up with. | |
Re: I don't have my crystle ball with me at the moment, so please describe the problem with your program. | |
Re: There are a few tutorials, such as this one ([URL="http://www.google.com/search?hl=en&q=windows+registry+c%2B%2B+tutorial&btnG=Search"]click here[/URL]) | |
Re: I don't think so because the registry isn't a file. If you know the filenames of the registry (there are more than one file) you would get the timestamp the last time the registry was changed, that won't tell you anything about an individual registry key. | |
Re: Maybe the question is simple but the answer is pretty complex. First you need to learn how to write Windws programs and understand the windows messaging system. [URL="http://www.winprog.org/tutorial/"]Here is a tutorial[/URL] to get you started with that. It only touches on the highlights, and there are months (or years) of … | |
Re: declare them at the top of world.cpp. You have to treat static class variable just like any other normal global variable. [code] #include <vector> using std::vector; #include "Breeture.h" #include "World.h" [color=red] //initialize class static variables unsigned int world::worldPopulation = 0; unsigned int world::totalBreetures = 0; [/color] World::World(vector<Breeture*> *initialBreetures) { livingBreetures … | |
Re: Once you know the web site, just spawn a process similar to below. Create a string like that, replacing DaniWeb.com with the site you want to go to. Note: this is on my Vista box so your browser might be in a different location on your computer. Right-clikc on your … | |
Re: First get it to work with a command-line parameters then you can try to make it a GUI if you wish. Probably step 1 would be to just hard-code the information in the program so that you don't have to type it every time you run the program (which might … | |
Re: If you are using MS-Windows and Microsoft compiler then you can find some c++ classes [URL="http://www.codeproject.com/info/search.aspx?artkw=printer"]here[/URL]. | |
Re: sounds like you want to write a screen saver? Maybe [URL="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=how+to+write+a+windows+screen+saver&spell=1"]these google links[/URL] will help How to make the words display with a lazer depends on the lazer. There are many kinds of lazers -- I once write a program for a large lazer that etched words onto plastic items … | |
Re: >>strcpy(OB.v2, v1); //OB is an object of Class B You have that backwards -- first parameter is destination and second parameter is source. | |
Re: What operating system? MS-Windows see [URL="http://msdn.microsoft.com/en-us/library/aa363195(VS.85).aspx"]Communications Reference guide[/URL]. | |
Re: The difference also depends on the operating system -- on *nix there is no difference between text and binary written files because *nix compilers make no translation of the '\n' character in either mode. That is, the file itself will contain the same information whether writting with a stream opened … | |
Re: lines 3 and 4: Those should be std::string objects, not char. VB [b]String[/b] is something like std::string. From brief look at that c++ code, you don't know c++ either. | |
Re: [URL="http://www.awitness.org/software/text2html_help/windows_start_menu.html"]maybe this will help[/URL] | |
Re: [URL="http://www.cprogramming.com/tutorial/function-pointers.html"]tutorial[/URL] | |
Re: Post your questions on one of their forums, afterall they are the experts, not us. | |
Re: Your program has probably trashed memory somewhere. I'm 99.999% certain the problem is NOT witth std::string so it must be somewhere else. Look for buffer overruns and use of initialized pointers or dereferencing null pointers. If you can please attach the files instead of just posting them with code tags. … | |
Re: You can easily test your question yourself. Write a small program to find out how the >> operator behaves. I could easily tell you, but testing it out yourself is a much better teacher. | |
Re: 1) line 36: you don't need that line because line 35 has has already assigned val all the words including spaces . You can use stringstream to convert from std::string to int or float, but I find it more convenient (in most cases) to just use atol() and atof(). There … | |
Re: [QUOTE=FTProtocol;642770]Well in VB6 they use Chr() example: [code] Do sChar = Chr(GetRandomNumber()) Loop While sChar = Chr(34) [/code] Just wondering if there is a similar function in c++?[/QUOTE] Its not necessary to do that in C++ or C. A char can be freely used as either an integer or a … | |
Re: you can do this: [icode]vector<Character> characters;[/icode] The above will let you add as many Character class objects as you want to the vector. | |
Re: line 13: >>char *ns=(char*)malloc(l*sizeof(char)); 1) remove the typecast because C doesn't require the return value of malloc() to be typecast. 2) remove [b]sizeof(char)[/b] because its value is guarenteed by the C languauge to always be 1. line 14 needs to be moved down below line 16. If [b]ns[/b] is NULL … | |
Re: In the program, did you give CreateProcess() the full path to the file? e.g. c:\windows\system32\notepad.exe? If not, then I suspect the problem may be in the environment variables. The system was probably looking for notepad.exe and couldn't find it. You can easly test this by adding the full path, recompile … | |
Re: [QUOTE=linux;641827]I can name all of them, and I'm 15. That's not good :P[/QUOTE] Great Going!! Its nice to meet someone your age who knows all those old songs. I'll bet you are one in a million people your age who can do that. | |
Re: Welcome to DaniWeb. Hope you enjoy your stay here. As for your question, please post for discussion in the [URL="http://www.daniweb.com/forums/forum27.html"]Software Developers Lounge[/URL]. | |
Re: You can also do what I did once -- 1) unplug and then remove all cabels from the PC 2) open back door 3) toss pc out the door and watch it smash all over the concete patio. Ooooh what satisfaction :) | |
Re: You are asking for an awfully lot of information -- the job description for each of those could be a page or two. You might be able to find some (or all) the information by using google, For example this one: [url]http://www.google.com/search?hl=en&q=what+is+an+infrastructure+architect%2C&btnG=Google+Search[/url] | |
Re: [QUOTE=sarehu;640950]Congratulations, you've singled out the least important part of the style guide.[/QUOTE] Not so, tabs are the most visible. They can destroy the whole program no matter how well-written it is. Tabs look crappy when use in code tags here at DaniWeb because they can render the code almost unreadable. | |
Re: [QUOTE=jshashi;641547]hi, i am doing my MCA & i am new to c & C++ :). I require your guidence to study & learn about C++. I dont know its my inablility or lack of practice, whats the best way to learn this.........any one your suggestion plz thanks regards shashi[/QUOTE] Welcome … | |
Re: >>I am creating a new sorting algorithm Not very likely unles you are doing a Ph.D. thesis. Sort algorithms have been one of the most researched topics in computer science, so designing your own unique algorithm is very unlikely. | |
Re: just use find() then substr() in a loop [code] size_t pos; while( (pos = str.find('\')) != string::npos) { string tmp = str.substr(0,pos) + str.substr(pos+1); str = tmp; } [/code] | |
Re: I don't go to see fireworks any more -- watch them mosquito-free on tv. Last night I watched Boston Pops Orchestra annual televised concert, which included nice fireworks afterwords. | |
Anyone tried (or does now) watch TV on a PC ? I have Dish Network (satallite TV) for my TV but was wondering how to channel it to my PC. | |
Re: Are you using the Borland graphics from graphics.h in Turbo C or Turbo C++ ? Yes, then I'm not supprised it doesn't work with modern high-powered graphics cards. Afterall, Turbo C is something like 20+ years old. |
The End.