15,300 Posted Topics
Re: [QUOTE=duybk;1612941]Now I really dont know what you mean? :)[/QUOTE] [URL="http://lmgtfy.com/?q=C%23+tutorials"]Here is the help you seek[/URL] Now do the same with c++ | |
Re: [QUOTE=sadafkha]hi; i m student of MCS-1 i want to make a project in c++; in dat i want to make window... can any one hlp me and tell me how an i do so...?[/QUOTE] If you are using MS-Windows then study [URL="http://winprog.org/tutorial/"]this tutorial[/URL] | |
Re: The photo is a fake. Anyone with half a brain can use photoshop to do that. | |
Re: disk-based os is cheaper -- you don't have to buy internet connection in order to use it. disk-based os is more reliable and faster. You don't have to rely on other people's computers in order to run your own. | |
Re: Which post? I'm not going to search all 78 of your posts to find out why someone voted you down. | |
Re: add a [b]break[/b] statement after line 6 to stop the loop, otherwise the program will just keep on looking for spaces. >>I'm not 100% confident I wrote that correctly The easiest way to determine if the code you write works correctly is to run it several times using different input … | |
Re: On DaniWeb???? Probably not. Our members would not do anything like that. | |
Re: line 82: use == operator, not = assignment operator. Same on other if statements. | |
Re: You mean you have a MS-Windows full-screen program and you just want to put a listbox on the window that contains the same functionality as the OpenFileName common dialog box? I'm not familiar with how StarCraft displays a list of maps, maybe you can post a thumbnail picture of it. | |
Re: [QUOTE=Sadun89]:icon_question::icon_question::icon_question: what did you mean:icon_question:[/QUOTE] He was joking :) | |
Re: No. You can build windows gui programs, but you have to do it manually or buy someone else's program that produces windows resource files. You could also use a different IDE/compiler, such as QT which contains gui guilder. | |
Re: It will, but you will have to rearrange the dates in yyyymmdd format first, where 12/10/2009 becomes 20091210 and a date like 12/1/2009 would become 20091202 (force 0 leading month and day to make then 2 digits). Put all date strings in std::string objects then you can use > and … | |
Re: Hit the "Flag Bad Post" button and ask a moderator to move it for you. | |
Re: >>The issue is that I cannot be certain that the length of str1 is enough to hold both str1 and str2. And there is no way to do that in C language. C language lets the programmer do a lot of things that are potentially harmful to the program, and … | |
Re: Isn't the use of utorrents illegal, such as downloading pirated software, movies, music, etc? Are there legitimate uses of torrents? | |
Re: reg cleaners can do more harm than good. The only time a reg cleaner might be of any value is when you install and uninstall many programs that do not do a good job of cleaning up after themselves during uninstall. And even then its questionable to use one because … | |
Re: Not all the values between 0 and 255 have printable ascii values. The only printable ascii values are between 32 (a space) and 126 (the dash - ). All the values outside that range will just print nothing, squares, or other seemingly random garbage. See [URL="http://www.google.com/#sclient=psy&hl=en&source=hp&q=c%2B%2B+sockets+tutorial+windows&pbx=1&oq=c%2B%2B+sockets+tutorial&aq=1&aqi=g2g-v1g-j1&aql=1&gs_sm=c&gs_upl=4130l6921l1l10187l16l13l0l7l7l0l186l959l1.6l7&bav=on.2,or.r_gc.r_pw.&fp=b1778f3db6f45f54&biw=1073&bih=524"]this ascii[/URL] chart for all … | |
Re: %i = integer, but its the same as %d %u = unsigned integer | |
Re: Assuming this is a console program on MS-Windows operating system. 1. call [URL="http://msdn.microsoft.com/en-us/library/ms683175(v=vs.85).aspx"]GetComnsoleWindow()[/URL] to get the HWND of the window 2. call [URL="http://msdn.microsoft.com/en-us/library/ms633519(v=vs.85).aspx"]GetWindowRect[/URL]() to get the RECT structure that contains the window's size. | |
Re: Your first code snippet is not acceptable on any standard version of C. However some old compilers, probably Turbo C, might accept it. C and C++ languages both require main() to always return int. | |
Re: Since you are using CLR/C++ (managed code) instead of just c++ you should be calling System.IO.FileSystemInfo's [URL="http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.attributes.aspx"]GetAttributes[/URL] instead of the win32 api function GetFileAttributesEx(). | |
Re: I would like to see Dani apply those same rules over on PFO. There currently are no rules against sig only spamming, so many of them are not deleted, although I must admit to deleting them anyway in some cases. For example I'll delete "nice post, thanks for sharing" type … | |
Re: [URL="http://www.google.com/#sclient=psy&hl=en&source=hp&q=c%2B%2B+sockets+tutorial+windows&pbx=1&oq=c%2B%2B+sockets+tutorial&aq=1&aqi=g2g-v1g-j1&aql=1&gs_sm=c&gs_upl=4130l6921l1l10187l16l13l0l7l7l0l186l959l1.6l7&bav=on.2,or.r_gc.r_pw.&fp=b1778f3db6f45f54&biw=1073&bih=524"]Here[/URL] are a few tutorials you might want to review. | |
Re: line 26: does N_row contain a valid value? I don't see how the code you posted could cause a stack problem since it doesn't appear to be using any arrays. The real problem could be somewhere else in your program, but its just manifesting itself in the code you posted. … | |
Re: >>how does a lone programmer with a few languages at his disposal make awesome software Depends on what YOU consider "awsome". Awsome software such as Microsoft Word or Paint, is written by a team of programmers, analysts and graphics designers. And it usually takes years to design, code and test. … | |
Re: [QUOTE=gyle0123;450059]Hey..sum1 help how to psot some msgs. and questions here!1..Plz[/QUOTE] why are you bumping a 2-year-old thread? And please spell out words so that everyone can understand you. I, for one, haven't the slightest idea what you posted. | |
Re: BSTR is already a pointer, so BSTR* is like writing char**. FunctionA() only needs BSTR* if it plans to allocate the memory for the variable declared in the calling function. [URL="http://blogs.msdn.com/b/ericlippert/archive/2003/09/12/52976.aspx"]Here[/URL] is a good explanation of how BSTR works. Scroll down the page and it will show you how to … | |
Re: Did you calculate the amount of memory that program takes? 15000*100*sizeof(float) is the number of bytes need for just one of those arrays. | |
Re: You will have to check each character to find the spaces and/or tabs, then convert the next non-white-space character to upper case (there could be more than one white-space characters between words). You have to use a loop to do that. As for toupper(), check your compiler to see if … | |
Re: what is the problem? What does it do that you don't want it to do? Does it assemble without errors? If not what are the error messages? I can see that line 18 is a non-conditional jump which will cause an infinite loop. | |
Re: And what compiler and version of that compiler are you using? Not all compilers are created equal. | |
Re: [QUOTE=Wonder;443302]One thing that is good to remember is that ++i is returned by reference while i++ is returned by value.[/QUOTE] Never heard that one before.:-O | |
Re: line 22 destroys the value of all the grades. Delete that line line 24: only grade[32] is used in that switch statement. And grade[32] is wrong because it accesses an element of grade array beyond the bounds of the array. In orderwords, there is no grade[32] element. Elements are numbered … | |
Re: All you have to do is redirect stdout to a file. For example if the name of your program is [b]myprog[/b] then on the command line or in a batch file [icode]myprog >myfile.txt[/icode] With that, all the stuff that is printed with printf() statements will be directed into the text … | |
Re: Homework? Here is where to start [code] #include <stdio.h> int main() { // put your code here } [/code] | |
Re: I hope you are not a native English speaker :) 1. 0, I don't drink alcohol any more. 2. I have no clue what that question means. 3. Or this one either. "keep it up?" in USA usually refers to a man's penis. 4. Don't know about this one either. | |
Re: >>Also what is the point of WinMain anyway? Won't I be able to use windows.h without it? Yes, windows.h is often used in console programs. I don't do OpenGL programming so I don't know the significance of using WinMain() vs main() >> are all C libraries, standard or third party, … | |
Re: And note you have to include windows.h in order to use Sleep() | |
Re: [QUOTE=mehaksyeda@gmai;1604561]my progrms don't run what i do?[/QUOTE] Simple. Fix it. | |
Re: [quote]Does it turn it into a stringstream.. or does it just somehow use it without turning it into a stringstream? If it does turn it into a stringstream, does it mean someInt can no longer be used as an int?[/quote] The integer is NOT turned into stringstream. Instead, stringstream will … | |
Re: Your program will have to read them all into memory then keep only the ones you want. >>which function should i use Its not a function at all. Its called an algorithm. Use ifstream to open the file as a normal text file then in a loop use >> operator … | |
Re: You mean something like this? If you run this program you will see that class A is common to all the other classes. There are not separate instances of class A in class B, C and E. Any changes to the data in class A is reflected in all other … | |
Re: I didn't retire from programming until I was 63. Shortly after that I got bored so I took a part-time non-programming job. People who just go out to pasture to "live a peaceful life" usually don't live very long because they fail to keep their mind active. That's one of … | |
Re: If that is all it is doing [code] double* foo(couble d1,double d2,double d3,double d4,double d5,double d6) { double* d = malloc(5 * sizeof(double)); d[0] = d1; d[1] = d2; // etc return d; } [/code] | |
Re: Don't put throw in constructors because that will require the calling program to put all the code that uses the class in one huge try/catch block. A better design is to have a constructor that doesn't need throw and then write another method that uses it. | |
Re: Looking for running processes won't help with that problem because it doesn't tell you what the processes are doing. Launching other programs is the easy part, just a win32 api function call. Watching what other processes are doing will be a lot more complicated. | |
Re: native c++ does not support CString -- that is a MFC c++ class. The cstring header file you included is the same as C's string.h, which is not at all like CString or c++ string. >>what is the problem? include <string> header file and use std::string object. [edit]If you are … | |
Re: depends on the operating system. For MS-Windows, see [URL="http://msdn.microsoft.com/en-us/library/aa376868(v=vs.85).aspx"]ExitWindowsEx()[/URL] | |
Re: If that last line is executed instead of any of those if statements then the line 6 is the obvious problem. have you checked the value of lparam and lparam & 0x80000000 ? And why don't you just simplify that line by using 0x80000000 instead of 1 << 31 ? … | |
Re: You want to call [URL="http://msdn.microsoft.com/en-us/library/ms682425(v=vs.85).aspx"]CreateProcess()[/URL] The function isn't nearly as bad as it looks because some of the parameters can be 0 For example [code] STARTUPINFO sinfo; PROCESS_INFORMATION pinfo; memset(&sinfo,0,sizeof(STARTUPINFO)); sinfo.cb = sizeof(STARTUPINFO); memset(&pinfo,0,sizeof(PROCESS_INFORMATION); CreateProcess("Notepad.exe","c:\\logs\\Log.log",0,0,FALSE,0,0,0,&sinfo,&pinfo); [/code] |
The End.