- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 14
- Posts with Upvotes
- 14
- Upvoting Members
- 11
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
52 Posted Topics
Re: Agree with the above, just thought I'd add since no one else has mentioned that iostream.h is deprecated and you should ideally use <iostream> without the .h extension. | |
Re: [QUOTE=SoulMazer;1288127]Wow, when I use that code you gave me, I get a whopping 104 errors! New record, baby. Well I guess I should post my real code, since I do quite a bit while iterating. As for the errors....I'll just put in a few. It looks like some of the … | |
Re: The power supply is definately big enough, however if it is malfunctioning & not putting enough power into the components then it can cause system lockups or BSODs. There could be the theory that it isn't putting enough through the rails but with those components I'd say it more than … | |
Re: Well as I imagine you've figured Windows API or MFC are both Windows only, this is fine if that is the only platform you're wanting to code for but what happens if you ever want or need to change platform? You'll find yourself wanting to learn another set of libraries … | |
Re: [QUOTE=AuburnMathTutor;1287995][code] #include <iostream> using namespace std; int main(int argc, char* argv[]) { char Ans; cout << "Keep Going? "; cin >> Ans; if(Ans=='y' || Ans=='y') main(argc, argv); } [/code] An idea, anyway. Otherwise, a do-while will work fine. [/QUOTE] Recursion with main() is rarely a good idea, in fact if … | |
Re: [QUOTE=A1 data nz;884694]Sounds like the ps2 connection may be failing. If it's a physical hardware problem with the connection then everthing may look rosey to the os. Tell him to get a usb mouse and see if that works. I've had that prob a few times, try to remave the … | |
Re: The error you're getting is the error code for an inaccessible boot device, where exactly do you get the error? Can you boot up in safe mode for example? As atleast with safemode AVG won't be starting up, only necessary system drivers are loaded for safemode, no programs. If not … | |
Re: [QUOTE=VBNick;901246]Funny....I thought the topic of a thread was usually decided by THE ONE WHO POSTED IT. How can you, with such a technical hobby, be this ignorant? [/QUOTE] This isn't my fight, I'm positive tux4life can argue his own opinions but in the interest of fairness I figure I'd make … | |
Re: Just to add to the general information flow here, the [url=http://www.cplusplus.com/reference/std/limits/numeric_limits/]numeric_limits[/url] class inside of [url=http://www.cplusplus.com/reference/std/limits/]<limits>[/url] can be used to see stuff like how much decimal digits your implementation can represent for a specified type before loss of precision. Example... [code=cpp] #include <iostream> #include <limits> int main() { std::cout << "double … | |
Re: [QUOTE=caperjack;902353]as stated already ,the beta version will expire June 2010,it will start shutting down every 2 hrs in April 2010 so really not much sense install it as a main OS on your main computers hard drive ,but if you wanted to play with it you could always add a … | |
Re: [QUOTE=crunchie;899399]You do not need a patch with 64bit systems for RAM. It is automatically recognised. Could possibly be an overheating problem. Make sure that your HSF is in correct contact with the IHS and that you have the right amount of TIM in between. Check if the shutdown feature (if … | |
Re: [quote]I'm getting really confused. I also forgot to mention that my computer has an old PSU (550W), could this be the cause of any problems?[/quote] Possibly, check the voltages during intensive use. It suprises me alot how people don't twig on to how often the PSU is actually the cause … | |
Re: I think Borland C++ Builder Personal Version has always had some compatibility issues with Vista, but as I don't use it I don't know for sure, so don't quote me on it. For integrity I will assume you've ran as Administrator? Is there a reason why you're not giving Code::Blocks … | |
Re: Well without giving you the code directly, since it's usually far easier to learn by doing it yourself. iInfo doesn't have a member called WriteToFile(), "Success" isn't an iInfo object, which is what the function expects as a parameter & then OutFile, well the iInfo.c_str() isn't a string to a … | |
Re: CMOS battery affects time & date, along with customized BIOS settings. If your notebook isn't powering on at all, the problem is likely elsewhere. (Computers default to their earliest date & default bios without CMOS battery but they still turn on) | |
Re: Resetting BIOS wouldn't likely do more harm than good but it could be annoying, on that note it sounds like you may have found your problem there, it sounds like it is obviously a problem near the 1st stages, like the motherboard failing POST & refusing to start the OS. … | |
Re: It's not that getline isn't working, it's that you're using cin & then using getline, what is happening is the \n delimiter used in cin, for example when you put that you're feeling good, you press enter, at that point \n is in the buffer. When you use getline after … | |
Re: You are "piggy backing" on my old thread. Please start a new thread because every time you post something , it shows up in my email. Thank you. Tumbleweedracef Well if you don't want emails, turn off thread subscription or change your subscription options. Control Panel > User Control Panel … | |
Re: Try updating your bios firmware, there should be instructions & a download at the site of your Mobo manufacturers site. Sometimes bios firmware updates fix bugs or similar although usually they upgrade to accomodate new hardware it is worth a try. Also just to note, although it can be pretty … | |
Re: Probably Shadow Copies & Restore points, Vista creates them often & they often take up chunks of space once plenty of them are created, so my 1st thought would be to perhaps check that. Use Disk cleanup. I'm sure you probs know where & what but just for if not, … | |
Re: [QUOTE=caperjack;882983]kind of sounds like you have a bad power jack on the laptop ,where the cord plug in ,if you have to wiggle it to get it to work it likely need to be replaced or re-soldered on the motherboard ,my Daughters Compaq went at about 3 yrs old, the … | |
Re: It sounds like a faulty PSU problem to me... Sounds like once your computer starts up a game & the CPU recieves more voltage along with the GPU & other components recieving more (for example the GPU will change from 2D mode to 3D mode & start consuming more power, … | |
Re: [QUOTE=dotti;881285] Depends on your specs (computer specifications). If you have a fast computer with at least 2 GB RAM it will be not much slower than XP. If you're below this specs, VISTA will appear to be much slower. I would buy Vista with integrated SP2 in your place. Don't … | |
Re: [QUOTE=gstek;883719]3 Gb is slight larger than what a 32 bit Os can recognise, So upgrading to more ram would be waste of money. BDW why you need ram more than 3gb???????[/QUOTE] Umm, No it's not, 32-bit OS can address 4GB of RAM however a chunk of memory is reserved for … | |
Re: Somehow I don't think anyone in their right mind would be willing to give you C++ code, there is a C++ section but we don't give you code, you supply the code you've done & let us know what specifically you're having trouble with, then we'll help you but we … | |
Re: Use [noparse][code][/code][/noparse] tags, otherwise you likely won't get much help... [url=http://www.daniweb.com/forums/thread78223.html]see here[/url]. Edit: Narue edited post to include tags just as I wrote this.. Ah well see above for future reference! :D | |
Re: [QUOTE=caperjack;881595]if that is the case then you may want to run this removal tool . [url]http://www.sophos.com/products/free-tools/conficker-removal-tool.html[/url][/QUOTE] Before using removal tool, perhaps it's best to find out whether there is something to remove? [url]http://www.confickerworkinggroup.org/infection_test/cfeyechart.html[/url] :) | |
Re: WMI Filter is being accessed without sufficient permissions by the looks of it. Clear all the event logs of that error (it's a requirement to help stop the hanging) then copy & paste this script (below) into notepad & name it Test.vbs, log into safe mode & then run the … | |
Re: I take it you have tried using GetLastError() function & seeing what that is? (what is the value of GetLastError() for you?) Because the return value of CreateFile() is INVALID_HANDLE_VALUE only if the function fails. As a 2nd "guess" are you using the CreateFile() on a file that is deemed … | |
Re: Use memset... memset(fileName, 0, MAX_PATH); Rewrites the elements to 0. | |
Re: The function maybe returning a string, but nothing is actually recieving the string to display it. Corrected code with comments next to where I changed. [code=cpp] #include <iostream> #include <string> using namespace std; struct dateType { int day; int month; int year; }; // declare some functions if necessary // … | |
Re: is_leapyear(int) must return a value, it doesn't it only sets a bool value but doesn't return it. I added the return keyword before leap_yr = true; & leap_yr = false;, & my output were 2000 is a LEAP year 2004 is a LEAP year 2005 is NOT a LEAP year … | |
Re: Assuming you're using the Windows API & GetDriveType() then here is the list [url]http://msdn.microsoft.com/en-us/library/aa364939.aspx[/url] | |
Re: [QUOTE=hoodatguy;758053]I want to use a dual boot with home premium and business; will i be able to use all my documents and programs which are installed on the "home side C:"? My other option is to do c clean istall and trck down all my software and drivers; which I … | |
Re: [QUOTE=aburich_44;793553]i dont think so. i mean i right clicked it, then i clicked properties, and i didnt find anything about Runtime Library or "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)... its just like a regular files properties. anyways that program blocks watever, i cant find the MT thing :( :([/QUOTE] In … | |
Re: Perhaps Windows API? Considering all those platforms are Windows, there is a [url="http://msdn.microsoft.com/en-us/library/aa364975(VS.85).aspx"]GetLogicalDriveStrings()[/url] function available although the minimum supported Client is Windows 2000, so that'd rule Win 98 out. (Or atleast, not guantee it would work properly) If GetLogicalDriveStrings is used, it'd also probably be a good idea to use … | |
Re: [QUOTE=CPPRULZ;782618]Wow. okay i did what mosaic said and it compiled fine. Thank you so much for dealing with my sloppiness and 1 last question: I get a warning when dividing a float (defo) with a 16.0 and no warning when dividing defo by 16. The warning states: warning C4244: '=' … | |
Re: [QUOTE=GURU1349;780728]ok i solved the problemand i created an exe.but it just opens and closes so fast,u cant even see the writing. i added return 0; and added a breakpoint on that line but it keeps doing it.in the visual c++ it runs normal.but when i run the exe it opens … | |
Re: Although a little late to the party, NOD32 is 1 of the best AV, it's light, with a good detection rate, coupled alongside Outpost Pro (Firewall) it makes for pretty good detection. Kaspersky Internet Security (AV/Firewall package) is also another good candidate as far as security goes anyways. | |
Re: getline(cin, variable); Generally the more preferable option in the majority of cases as far as I'm aware. (It'll get an entire line including whitespace, use enter to terminate input) | |
Re: [QUOTE=Gekitatsu;774975]I changed the code to [CODE] if( weaponDamage == line.substr(0, weaponDamage.length())) { attack = atoi(line.substr( weaponDamage.length()+ 1 )); } [/CODE] but I get the same error cannot convert `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to `const char*' for argument `1' to `int atoi(const char*)'[/QUOTE] attack = atoi(line.substr(weaponDamage.length()+1).c_str()); fixes that problem, I were … | |
Re: You've got your code written in "hello.cpp" but it's not part of the project you have open, chances are it's building "program.cpp" & hence the output you're getting. Put that code into "program.cpp" then try rebuilding & running it. | |
Re: You can check the 1st letter of a string like an array, that is string test = "family"; so test[0] would be 'f', test[1] would be a, & so on, so generally just test the 1st letter of a string that way for if it is an f or F. | |
Re: [code=cpp]#include<iostream> #include<cstdlib> #include<ctime> #include<string> using namespace std; class typecard { public: int displayCards(); }; //function display which cards was randomly choosen; int typecard::displayCards() { int card1; int ranCards(rand()%13+1); int suit(rand()%4+1); for(int i=0;i<5;i++) { suit = rand()%4+1; ranCards = rand()%13+1; } switch(ranCards) { case 1: if(suit == 1)//represents hearts. { cout<<"Ace … | |
Re: I figure I ought to start off with in C++ with classes you can only declare variables not initialize them... Initializing them can be done via constructor. [code=cpp] class example { int testint; public: example(); int ret_val(){return testint;}; }; example::example():testint(123){}; //Constructor initializes testint to 123. You can also do initialization … | |
Re: [QUOTE=serkansendur;760322]ok tell me why flush method does not work in this case ? here is the information from the book: Flushing the Output Buffer Our programs have already used the endl manipulator, which writes a newline and flushes the buffer. There are two other similar manipulators. The first, flush, is … | |
Re: [QUOTE=shadwickman;759031]please edit your first post and place your code in CODE=cpp tags.[/QUOTE] Agreed... As a side note... [quote]void main(void)[/quote] void main is bad practice, main returns an int & doing otherwise is just asking for bad things to happen. | |
Re: Do you have any other devices connected to the laptop? For example a Joystick or Game controller or similar? It's a long shot but if you have it is possible that signals from such devices can interfere with other instructions, albeit it's more viable in certain games... As said long … | |
Re: It would likely help if you included using statements before main... try #include <conio.h> however if it still doesn't work with the below code, just get rid of it for now & take 1 problem at a time. [code=cpp] #include <iostream> int main() { std::cout << "HELLO" << std::endl; std::cin.get(); … | |
Re: Are you not allowed to use strings or something? If you are allowed, below gives you an example of what you want (albeit with use of string), it passes each letter in a string to the "tolower()" function 1 by 1, which changes the characters, if it meets a space … |
The End.