- Strength to Increase Rep
- +16
- Strength to Decrease Rep
- -4
- Upvotes Received
- 267
- Posts with Upvotes
- 241
- Upvoting Members
- 117
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 5
1,174 Posted Topics
Re: Try using #include <iostream> instead of #include <iostream.h> iostream.h is a deprecated header, hence you receive the warning. | |
Re: [QUOTE=plang007;1489962]I did it. Alright, I got it to work with only one loop, but can you tell me why in my output tags2 is reading 18 data sets when it is only supposed read 10.[/QUOTE] Hint: 8 [B]+[/B] 10 = 18 | |
Re: When [ICODE]cin[/ICODE] encounters Ctrl-Z, [ICODE]cin.eof()[/ICODE] will return true. So e.g. [code] if(cin.eof()) { cout << "bye ..."; return 0; } [/code] | |
Re: >> I have debugged the syntax errors and now need help with the logic. I think I got >> one of the logic, so there *should* only be 2 left. So, if you've gotten the code to compile, it might be worth testing its functionality to see where it goes … | |
Re: [QUOTE]So what looks to be the problem?[/QUOTE] There might be many reasons, e.g. any application you have open may also abort the shutdown (since you are not forcing it), maybe your system does not support the power-off feature or your program lacks the shutdown privilege etc. To get a bit … | |
Re: >> AS U CAN SEE IN MY PROGRAMME ... Please don't SHOUT, thank you. As for the problem, I believe [icode]closegraph()[/icode] will do what you want. | |
Re: About the access violations, in [ICODE]Queue::dequeue()[/ICODE] and [ICODE]Queue::front()[/ICODE] you have to watch out for [ICODE]first[/ICODE] being a NULL pointer. Now you end up accessing the member variables through a NULL pointer, giving the access violations. Then .. [code] int num_Serv; cin >> num_Serv; // In C++ you cannot have variable … | |
Re: [QUOTE=integer*09;641895]im using the ios::nocreate in a fstream with vc++ 2008 express but its say its not a member of std::basic_ios...[/QUOTE] That flag is not available anymore, so simply don't try to use it. (The same goes for [ICODE]ios::noreplace[/ICODE]) | |
Re: You want to make sure that you are NOT trying to execute the DEBUG version of your executable on machines not having Visual Studio (2008) installed, i.e. build and use the RELEASE version on such machines. ![]() | |
Re: You have forgotten to return a value from the [ICODE]countElements()[/ICODE] function. Isn't the compiler saying anything about that? | |
Re: [B]>> The code snippet does not compile with Dev-C++ 4.9.9.2. The error messages look like this: >> [Linker error] undefined reference to 'CreatePen@12' >> [Linker error] undefined reference to 'SelectObject@8'[/B] See the code snippet comments, there it says; [LIST] [*] with Dev-C++ link libgdi32.a via Project>>Project Options>>Parameters>>Add Lib>>libgdi32.a [/LIST] | |
Re: [quote]Hope this is the right place to post[/quote] Well, maybe you actually have to turn to other forums and request for the basic OS starter code there. By following Ancient Dragon's links above, you probably find relevant places sooner than later. | |
Re: There's some evil inconsistency ... In function.h, you declare: void input(int* &pi, int& n, ifstream &fin); whereas, in function.cpp you have: void input(int* &pi,int& n, fstream &fin) i.e., `ifstream` vs. `fstream`. | |
Re: [QUOTE=sriz6teen;537567] where is the code for printf and scanf fucntions... [/QUOTE] One place you can start with is at the following address: [url]http://www.koders.com/c/fid4E0FA789459803C1E4369279B96E5C9B257941C8.aspx?s=printf#L7[/url] That one is the GNU C's implementation. I think you probably find your way from there on to scanf. And doing a google on the file name … | |
Re: I would start by verifying that your function calls succeed. I.e., does `ImageList_Create(...)` succeed? How about the `ImageList_AddIcon(...)` calls and so on and so forth. | |
Re: Testing upload on Firefox 18.0.1 on Windows 7 ... Hmm, after having pressed Files on the toolbar, I get to see *two* upload fields+buttons (pic #1). Now, after having selected a file to be uploaded, I get to see no less than *five* upload fields+buttons (pic #2).  's signature has changed in-between the 8 vs. 9 versions (i.e., has DirectX 9 CreateVertexBuffer() dropped a parameter?). | |
![]() | Re: Maybe you get some ideas/clues from below, the important changes are that the file is read in one word at a time + the use of operator % >> i don't think std::string word is something we covered. Hmm, you already have there a std::string, namely the 'cloze'. [code] ... … |
Re: How about using the `LPARAM lp`? (MSDN: An *application-defined* value to be passed to the callback function.) | |
Re: I think you need to have a virtual destructor (currently you are observing undefined behaviour). | |
Re: I believe your problem(s) have already been pointed out, but .. > anyone know what is this error Microsoft has documented their compiler/linker error/warning codes, so, you can always look those up on MSDN, for example [Compiler Error C2780](http://msdn.microsoft.com/en-us/library/tk0k9b3w%28v=vs.110%29.aspx). | |
Re: If you are unhappy with the `SHBrowseForFolder()`, perhaps have a look at the [Show Shell common file dialog](http://code.msdn.microsoft.com/CppShellCommonFileDialog-17b20409) sample from MSDN. In your hook procedure, you need to use the parent of the `hdlg` in order to make `CommDlg_OpenSave_GetFolderPath()` work, i.e. `CommDlg_OpenSave_GetFolderPath(GetParent(hdlg), ...);` PS. I think attempting to cancel the … | |
Re: > what i missed from requiremnets Something you certainly missed, the requirements seem to state that: ... For a given positive integer K of not more than **1000000** *digits* ... Also, in general, you are not supposed to output *anything* which is not mentioned in the requirements (I'm referring to … | |
Re: You might find people eligible for the chocolate eclair at the [Visual C++ forum(s)](http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/threads?page=1) | |
Re: > Regarding VS2010, i'm getting the following error "Intellisense 'Unavailable for C++/CLI" when using "->" or "::" anyone knows how to correct this error? Microsoft did not provide the Intellisense feature for C++/CLI in VS 2010, in VS 2012 it is available though -- i.e., you may want to switch … | |
Re: According to the Wikipedia, the C++ is a [programming language](http://en.wikipedia.org/wiki/C%2B%2B) | |
Re: [Here you go.](http://www.daniweb.com/software-development/cpp/threads/78223/read-this-before-posting-a-question) | |
Re: Phew, I got it made! I posted the code [here](http://www.daniweb.com/software-development/cpp/threads/78223/read-this-before-posting-a-question), please study it carefully. By the way, this is a C++ forum - the **C forum** is right next door. | |
Re: > At present there's no feature for marking a single post as being the solution, aside from voting and adding reputation to that post, of course. It's in the cards, just not implemented yet. ;) In that case, would it be possible to have a feature so that only the … ![]() | |
Re: Great, computer shop project sounds like something interesting. Here is a fully working starting point for you .. // // Computer shop program (skeleton). // // Should compile cleanly on modern compilers. // #include <iostream> int main() { // // The program begins, let's display a friendly title .. // … | |
Re: Thinking about my 92yo grandmother .. I'd add this one: ITITAN = I think I'll take a nap. .. and certainly .. W! = **WHAT**!? (She doesn't have a hearing aid yet, but definitely needs one) | |
Re: I'd like to recommend reading about File and Registry Virtualization in Vista/Windows 7 in general - here's one link you could start from: [User Account Control Data Redirection](http://blogs.windows.com/windows/archive/b/developers/archive/2009/08/04/user-account-control-data-redirection.aspx) Also, you might have a look at [perror()](http://www.cplusplus.com/reference/cstdio/perror/). | |
Re: [QUOTE=williamhemswort;620795] But I dont see how its broken.. :icon_confused:[/QUOTE] Edward made a good point there, if you try [code]cout << CountDidget(INT_MAX) << '\n';[/code] What happens :?: | |
Re: Just in case anyone finds the topic interesting enough, somewhat detailed discussion pertaining to Microsoft's implementation can be found at: [Mismatching scalar and vector new and delete](http://blogs.msdn.com/b/oldnewthing/archive/2004/02/03/66660.aspx) .. and [Answers to exercises - mismatching new/delete](http://blogs.msdn.com/b/oldnewthing/archive/2004/02/04/67384.aspx) | |
Re: Are you possibly ignoring (m)any compiler warnings? | |
Re: I believe you are missing [ICODE]#include <windows.h>[/ICODE] So make sure you have [code] #include <windows.h> // <- first this #include <sql.h> // <- and then this [/code] | |
Re: [QUOTE=nbaztec;] Edit: Allow me to change my earlier comment so no one else gets confused. It is Number of characters MINUS the Null.[/QUOTE] Sorry, but you are not right about it - please start believing in what people are saying. [QUOTE=ISO/IEC 9899:TC3] size_t strlen(const char *s); The strlen function computes … | |
Re: When you post code, please use code tags ... [url]http://www.daniweb.com/forums/announcement8-3.html[/url] | |
Re: I know this is solved, but a detail which should not go unnoticed, namely // Allocate ... b = new int[1000000]; // ... and delete delete [] b; //// instead of // delete b; | |
Re: > However, a CURL error keeps coming out when I try to read from "https" protocol.... > The error msg is "Error from cURL: Unsupported protocol" You've probably downloaded a version without SSL support (you need SSL for the http**s** protocol). | |
Re: > If you accidentally hover over, you have to wait for the fade effect to go way. This is bad, it means that one must watch out for the ads. Why not 'turn this thing around' and perhaps try to emphasize the ad area/frame itself instead? | |
Re: A cast like `(LPWSTR)Buffer` only silences your compiler but does not correct the problem. I'd suggest reading some tutorials .. [The Complete Guide to C++ Strings, Part I - Win32 Character Encodings](http://www.codeproject.com/Articles/2995/The-Complete-Guide-to-C-Strings-Part-I-Win32-Chara) [The Complete Guide to C++ Strings, Part II - String Wrapper Classes](http://www.codeproject.com/Articles/3004/The-Complete-Guide-to-C-Strings-Part-II-String-Wra) | |
Re: > is there any way to know what actall files from the redist it needs, and is it ok and legal to just add them I would oppose trying to distribute individual DLLs (you cannot know the exact conditions under which a particular file should/should not be installed etc...). IMO, … | |
Re: This one might be a good candidate [Windows console tutorial / by Ben Ryves](http://benryves.com/tutorials/winconsole/1). | |
Re: You might have a look at [Wikipedia / Segmentation fault - common causes](http://en.wikipedia.org/wiki/Segmentation_fault#Common_causes). | |
![]() | Re: > I found the base address of the variable, but it changes every time I run Minesweeper. FYI, it's quite likely that your Minesweeper has been compiled with [Address space layout randomization](http://msdn.microsoft.com/en-us/library/bb384887.aspx) enabled, meaning that the address of the variable will continue to keep changing. To check whether this feature … |
Re: > unresolved external symbol "public: __thiscall grid::grid(void)" This is saying that you have *no implementation* of the `grid` class' constructor. | |
The End.