1,174 Posted Topics
Re: I'm guessing that .. //// Instead of .. // case '1': cout<<student.bla(c); break; // .. you probably want to have .. case 1: cout<<student.bla(c); break; | |
![]() | Re: > Hmm ... is anyone else experiencing this? At least Opera 11.61 / Windows 7 works perfectly well (regardless of zoom levels). ![]() |
Re: Innovative (mis)use of the Vote & Comment -mechanism appears to be on the rise ;) See e.g. the comment on my second post in this [thread](http://www.daniweb.com/software-development/cpp/threads/418210/how-to-make-native-program ). I'd imagine that a dedicated Reply -button on a per-post basis will be necessary? As a band-aid, maybe it would help to display … | |
Re: In case you plan to submit a bug report, check out the [GCC Bugs](http://gcc.gnu.org/bugs/) page. | |
Re: > i want to create array of pointer. "aa" "ab" "ac" You've forgotten brackets .. `{}`, i.e. const char *table[3] = {"aa", "ab", "ac"}; | |
Re: Have you tried the Help forum at [Code::Blocks forums](http://forums.codeblocks.org/index.php)? | |
Re: > I receive a segfault when trying to close the second file (fclose(ofp)) This suggests that **ofp** might be **NULL**. If it turns out that you are unable to open the output file, **perror()** is likely to be helpful. | |
Re: [QUOTE=Rasool Ahmed]I finally found the solution is by removing it in system boot.[/QUOTE] Are you aware of the regular [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365240%28v=vs.85%29.aspx"]MoveFileEx()[/URL] function? It may provide a working solution in this case (i.e. you'll need to use the MOVEFILE_DELAY_UNTIL_REBOOT flag). | |
Re: [QUOTE=ThomsonGB] 1>Linking... 1>XorCryt.obj : error LNK2019: unresolved external symbol __imp__CLSIDFromString@8 ...it was hard to find the right include file and I am not sure that that is enough.[/QUOTE] You still need to look up the necessary library (.lib), documentation [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/ms680589%28v=vs.85%29.aspx"]CLSIDFromString function[/URL] usually comes with a section titled [ICODE]Requirements[/ICODE] explaining the … | |
Re: [QUOTE=Vampiricx3]By body modifications I mean facial piercings, stretched piercings and tattoos. When I leave university I will have 2x 30mm (1" 1/8) ear lobes, 4mm inner conchs (cartilage in the back of your ear), 10mm septum (fleshy bottom of the nose), snake bites, 2x anti-eyebrows, and 2 sleeves, chest tattoo … | |
Re: [QUOTE=Suzie999]I am getting different behaviour now, but still not what I am expecting :( Now I am getting "55525" in both cases[/QUOTE] Use [URL="http://www.cplusplus.com/reference/iostream/stringstream/str/"]stringstream::str()[/URL] instead of [ICODE]ignore()[/ICODE]. I.e. [code] ss.str(""); // clear the buffer [/code] | |
Re: [QUOTE=Ancient Dragon;1773442]Example in [URL="http://www.daniweb.com/software-development/cpp/threads/78223"]this thread[/URL][/QUOTE] You'll probably find [URL="http://www.google.com/support/forum/p/Chrome/thread?tid=2c255f8613030426&hl=en"]How do I remove an adware by enhance.com?[/URL] useful. PS. IMO, they should change "Powered by Text-Enhance" to "Cluttered by Text-Enhance". | |
Re: You'll probably find [URL="http://eternallyconfuzzled.com/jsw_home.aspx"]Eternally Confuzzled[/URL] useful. | |
Re: It is more than just to get the [URL="http://linux.die.net/man/3/pthread_create"]pthread_create() syntax[/URL] right. How about taking some time and going through [URL="http://www.google.fi/search?q=pthread+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fi:official&client=firefox-a"]pthread tutorial(s)[/URL] | |
Re: Adding to what Ancient Dragon said, you might want to read up on [URL="http://msdn.microsoft.com/en-us/library/aa260976%28v=vs.60%29.aspx"]Hungarian Notation[/URL], the same topic in [URL="http://en.wikipedia.org/wiki/Hungarian_notation"]Wikipedia[/URL] with some criticism. Over time, you'll probably get used to it. | |
Re: I believe this happens due to a typo; [ICODE]Theading[/ICODE] vs. [ICODE]Threading[/ICODE]. | |
Re: Here comes a few more .. [url]http://www.daniweb.com/members/soigmaSoogy/922728[/url] [url]http://www.daniweb.com/members/grouccict/926598[/url] [url]http://www.daniweb.com/members/Pepinella/926694[/url] | |
Re: [QUOTE=konic2] 3. When I try to install driver for the HP printer I've got:[/QUOTE] Have you tried posting at [URL="http://h30434.www3.hp.com/"]HP Support Forum[/URL]? Trying to get rid of the various C/C++ runtime versions you have installed, is not a good idea, since likely quite a lot of software you've got installed … | |
Re: I'd suggest that you check the return values of the FMOD function calls, and use the [ICODE]FSOUND_GetError()[/ICODE] to figure out an error, i.e. [code] [COLOR="Red"]int[/COLOR] main() //<- main() returns an int { if( ! FSOUND_Init (44100, 32, 0)) { // initialization failed ... what is the error code? const int … | |
Re: [QUOTE=pato wlmc;1213609] Why the hell is there an i, does it means something, it's just an easy way to remember something or what?.[/QUOTE] Relax and read some Wikipedia -> [URL="http://en.wikipedia.org/wiki/Loop_counter"]loop counter[/URL] FYI. If you don't like (too) short variable names, you are free to pick your poison. I think, C++ … | |
Re: This is somewhat off-topic (being about Facebook user's oversight instead of a scam), but anyhow, perhaps something to be aware of. :| [URL="http://nakedsecurity.sophos.com/2011/06/07/how-facebook-ruined-thessa-16th-birthday-party/"]How Facebook ruined Thessa's 16th birthday party[/URL] | |
Re: [QUOTE=cwarn23]Can somebody give me instructions on how to install and configure this on my vps?[/QUOTE] Perhaps take a look at [URL="http://folding.stanford.edu/English/Guide"]Folding@home Client Installation Guides[/URL] and maybe [URL="http://folding.stanford.edu/English/FAQ"]Folding@home Frequently Asked Questions (FAQ) Index[/URL], too. | |
Re: Go through the stored items in the [ICODE]Library[/ICODE]'s destructor and explicitly [ICODE]delete[/ICODE] the items there. | |
Re: [QUOTE=MagicMedia]I have a chopping board that looks similar. Apple should sue Walmart for selling that to me.[/QUOTE] Hmm, maybe they will .. [URL="http://deanonsoftware.com/?p=581"]Apple says NO! to iPad Cutting Board[/URL] :-/ | |
Re: Have a look at [URL="http://msdn.microsoft.com/en-us/library/032xwy55.aspx"]/Tc, /Tp, /TC, /TP (Specify Source File Type)[/URL] [QUOTE=sergent]... everything you can do in C you can do in C++.[/QUOTE] Wait .. there are [URL="http://david.tribble.com/text/cdiffs.htm"]Incompatibilities Between ISO C and ISO C++[/URL] | |
Re: I believe you are missing an [COLOR="Red"]ampersand[/COLOR] there ... [CODE] ... void serialize(Archive [COLOR="Red"]&[/COLOR] ar, const unsigned int version) ... [/CODE] | |
Re: Good grief .. how come vijayan121's post ^^^ goes so unnoticed here? | |
Re: [URL="http://yosefk.com/c++fqa/"]C++ FQA Lite[/URL] may be what you are looking for. | |
Re: You might try the [URL="http://forums.codeblocks.org/index.php"]Code::Blocks' forums[/URL]. | |
Re: Some more suggestions for you to check: [URL="http://msdn.microsoft.com/en-us/library/4exw7xyc%28v=VS.90%29.aspx"]Fatal Error C1004[/URL]. | |
Re: [QUOTE=tonyjv]I was testing the marking of the first unused record so that later I can return the read values to main function for processing (search/filter, sort, add/delete)[/QUOTE] In case you do read [ICODE]MAXDATA[/ICODE] records, [ICODE]contacts[i].first_name[0] = '\0';[/ICODE] will be an out-of-bounds write. | |
Re: [ICODE]string[/ICODE] lives in the [ICODE]std[/ICODE] namespace, so e.g. [ICODE]std::string input;[/ICODE] ought to work. | |
Re: [QUOTE=dodgers]what i have done wrong?[/QUOTE] To get you started, delete line 138. | |
Re: In your implementation file you have [COLOR="Red"]forgotten[/COLOR] [code] void [COLOR="Red"]InsertionSort::[/COLOR]insertionsort(long theArray[], int n) [/code] | |
Re: [QUOTE=butler273] I keep getting values like [CODE] 0x1ea91250 0x1ea911f0 0x1ea91190 0x1ea91130 [/CODE] [/QUOTE] You are printing the pointers' values -- dereferencing (*) will fix this, i.e. [code] std::cout << * temp->objectData << std::endl; [/code] | |
Re: >> It compiles but it won't run. It doesn't compile cleanly though, GCC spotted a number of things .. [code] \main.c:16:6: warning: no previous declaration for 'enter_params' \main.c:40:6: warning: no previous declaration for 'mapping_addr' \main.c: In function 'mapping_addr': \main.c:49:6: warning: declaration of 'rep' shadows a global declaration \main.c:6:5: warning: shadowed … | |
Re: >> So, how is this static variable in 1.c printed here?? What happens when the preprocessor processes your [ICODE]#include "1.c"[/ICODE] directive that you have in [ICODE]2.c[/ICODE]? | |
Re: You could have a look at a tutorial - [URL="http://www.learncpp.com/cpp-tutorial/53-switch-statements/"]Switch statements[/URL] | |
Re: >> it gives me the output of *** but i cannot connect it to my password ( 123) You'll probably find [URL="http://www.daniweb.com/software-development/cpp/threads/139605/667450#post667450"]this post[/URL] enlightening. | |
Re: >> why this doesn't work correctly? The input stream has the [ICODE]skipws[/ICODE] format flag set, use [URL="http://www.cplusplus.com/reference/iostream/manipulators/noskipws/"]noskipws[/URL] to clear the flag. | |
Re: [QUOTE=tomtetlaw]I just did a ctrl+f in notepad when I opened the .lib file and it couldn't find the text 'KeyValue' would this mean they're not being exported?[/QUOTE] No. Rather use [URL="http://msdn.microsoft.com/en-us/library/c1h23y6c.aspx"]dumpbin[/URL], see its [URL="http://msdn.microsoft.com/en-us/library/ky8sk323%28v=VS.100%29.aspx"]/LINKERMEMBER[/URL] option. | |
Re: [QUOTE=problem]You are given two integer numbers: the base a (0 <[COLOR="Red"]=[/COLOR] a <= 20) [COLOR="Red"]and[/COLOR] the index b (0 <[COLOR="Red"]=[/COLOR] b <= 2,147,483,000).[/QUOTE] [CODE] ... if(a!=0 || b!=0) { ... [/CODE] What will your program do when both [ICODE]a[/ICODE] AND [ICODE]b[/ICODE] are zero? | |
Re: Use comparison ( [ICODE]==[/ICODE] ) instead of assignment ( [ICODE]=[/ICODE] ) in your if-statements. | |
Re: [QUOTE=LevyDee]... the file fails to open. [/QUOTE] [URL="http://www.cplusplus.com/reference/clibrary/cstdio/perror/"]perror()[/URL] is likely to be informative in this case. | |
Re: [QUOTE=pseudorandom21]but I get an assertion failure, "string iterators are incompatible"[/QUOTE] Are you really sure that [ICODE]std::find_if(...)[/ICODE] is failing? I'd imagine that the next line (35) would cause the failure -- [ICODE]it[/ICODE] being invalid at that point. | |
Re: We want a few mad people now. See where the sane ones have landed us! George Bernard Shaw | |
![]() | Re: [QUOTE=duk179;830838]yeah, I got the same situation. I changed the path to C:\\TC\\BGI then an error message appear like this: "16 bit MS-Dos sybsystem Turbo C++IDE The NTVDM CPU has encountered an illegal instruction. CS:0000 IP:00 blah blah" then I look down to my taskbar, I could saw my program for … |
Re: [QUOTE=paulkinzelman] I just tried making the routine have a return value and no args and it works. Then I tried adding in one argument and it fails, so it looks like the problem is with the arguments, not the return value. [/QUOTE] This suggests mismatched calling conventions (C# is assuming … | |
Re: [QUOTE=Tuloa]...Here is the code causing the app crash: [CODE] string ReadLine() { getline(file, lineread); if (lineread.find_first_of("WSF_") != string::npos) { return lineread; } } [/CODE] [/QUOTE] The function is basically badly broken -- what will it 'return' if [ICODE]lineread.find_first_of("WSF_") == string::npos[/ICODE]? Aren't you getting any compiler warnings? | |
Re: Since this thread's title is "How to Get User Input from console -- [I]safely[/I].", I think it's appropriate to point out a little thing. Namely, in the Aia's version, decrementing [ICODE]size[/ICODE] before entering the for-loop is a recipe for buffer overflow if [ICODE]size[/ICODE]'s initial value (for whatever reason) is zero. … |
The End.