- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 387
- Posts with Upvotes
- 341
- Upvoting Members
- 184
- Downvotes Received
- 25
- Posts with Downvotes
- 25
- Downvoting Members
- 15
I wear many many hats. Husband, Father, Geek, among others.I've built a couple websites and have some knowledge of HTML, CSS, JavaScript, MySQL, and PHP.I also know a little BASIC and C++.
- Interests
- Automotive (Specifically GM sports cars), Gaming, Programming (BASIC and C++), Scouting, Venturing (feel…
- PC Specs
- Win7 Pro (x86) on:Intel C2D E6600, 1GB Dual-Channel DDR400 Corsair XMS Pro (CAS 2), ATi x1650, 19"…
Re: Line 32 is a function prototype, not a function call. You will have to address that issue for the function to work correctly. You will need to create a copy of that line somewhere above the beginning of your main(), then re-format that line into a proper function call. [URL="http://www.cplusplus.com/doc/tutorial/functions2/"]Have … | |
Re: :-O Seriously? Pseudocode is simply a semi-natural-language summary of the actions performed, or a simplified description of an algorithm. If you understand the C++, you should easily be able to write a summary of the program's actions. Just read through each line of the code and state what it does... … | |
Re: Have you tried to compile and run this? I can see an issue with your calls to PrintMessage(). The error I see usually would allow compilation, but cause the linker to fail. You don't need the #defines. In C++ true and false are already reserved words. | |
Re: That is what they want. But the issue is that the input has to be contiguous. Your method only works if there is some sort of whitespace between the digits. | |
Re: [QUOTE=superhero6785;1449738]Good Bye, well...I have built bots for Silkroad Online, Runescape, and Aion using another program called "AutoItV3", It is a much more simplistic language and can be considered a "Ghetto Bot" but it does take some time to learn the language such as Pixelshearching (searching the screen for certain colors) … | |
Re: [QUOTE=jdumaine;1195710]When can you use a $ in a variable?[/QUOTE] You can't. That's why it wasn't mentioned. | |
Re: [QUOTE=karthik16;1710865]1.Write a C++ function that intakes 2 arguments: a character and an integer and prints the character given number of times.If ,however, the integer is missing the function prints the character twice.[/QUOTE] Do you know how to write a for loop? Write one that uses a range of [0, counter). … | |
Re: Why? They're still relevant. Besides, you just updated it.... | |
Re: Line 43, move the "[]" after the 'j' and see what happens. The braces need to be associated with the variable name, not the dataType. | |
| Re: Strictly interpreting the lab directions, you will need to use a while loop that runs as long as the condition [icode]grosssales != -1[/icode] comes true. This is called a "sentinel" value. Because you really can't have negative sales (that would then be purchasing), a more appropriate version might be based … |
Re: system(prgm); That actually calls the other program, pretty much everything else is just fluff. I'm afraid I don't know another way because I don't know Win32 API or any other APIs. I do know that this is a very insecure method though. | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/functions/"]Read this.[/URL] Now, take a look at the first line of your function... [CODE]int calcDays (int)[/CODE] Anything missing? | |
Re: I'm not in robotics, so I really can't help too much. Keep an eye out for mike_2000_17, I think he's in robotics, I'm sure he'll be able to help. | |
Re: It's actually very well run. But you need to issue your request properly. If you want a post deleted, use the "Flag Bad Post" button to report it and place your request in the report. This statement/report posts directly to the moderators forum for them to more-easily see and react … | |
Re: By default, an output file opens in "truncate" mode which dumps all of the file's current contents and starts the file over. To prevent this, you need to use "append" mode. [URL="http://www.cplusplus.com/reference/iostream/ofstream/open/"]Look through this page for more info.[/URL] | |
Re: Due to how streams and the extraction operator work, you can use stream input directly in the condition of any conditional statement (such as an if or a while). Try eliminating the !cin.eof() (which tends to be a very buggy construct) as the condition and moving cin >> a >> … | |
Re: Every character in the alphabet is represented by an integer called and ASCII value. Lower-Case (minuscule) characters have higher ASCII values than Upper-Case (majuscule) characters. Relying on this fact, you can use characters directly in comparison statements to determine what actions to perform, if any. [URL="http://www.asciitable.com/"]Here is a link to … | |
Re: Distance (Pythagoras' Theorem): [TEX]c = sqrt (a^2 + b^ 2)[/TEX] Area of triangle: [TEX]( base * height )/2[/TEX] Those are a couple of the equations you'll need. The rest is just like any other program. Input, Process, Output. [CODE]int main() { return 0; }[/CODE] | |
Re: If you use a function, you only have to write the averaging code once. This will save you time and make your code easier to read. In order for the average to calculate correctly, you have to base the index you're using to access the array on the control variable … | |
Re: I haven't bothered to test this because I don't remember the correct process so I wouldn't know valid results from invalid. This concerns me though: [CODE]Permute(vector<int> set) : set(set) { Run(); }[/CODE] Do initializers automatically resolve the "this" pointer? Otherwise, this looks like a scoping issue to me. | |
Re: It is possible to have more than 1 *.cpp file in a project. In fact, for most projects, you'll want more than one. However, it looks like you have 2 different assignments/projects here. If you right-click the file for the assignment/project you don't want and choose "Exclude from project" that … | |
Re: [QUOTE=Fireprufe15;1727842]That's actually a bright idea there. If laptops and PC's could get NFC chips, you could use your NFC enabled phone to login to Windows.[/QUOTE] I don't trust RFID-based technologies. Don't get me wrong, they have a place, such as inventory tracking; but I don't think they should be used … | |
Re: [QUOTE=KazenoZ;1487315]lol, it's ok, no worries. Also, I don't really know, I don't see how these contradict eachother; the program used to compile, until I don't know what changed really, then it started giving out these errors and wouldn't compile anymore, the new project, having the files pasted into it, would … | |
Re: [QUOTE=emokidzz;1706385]sorry if i used the name of heroes in warcraft.we'll change it because our project is text-based dota[/QUOTE] The problem isn't your hero class it's the program name "Warcraft...". If Blizzard gets hold of your program, you can be sued for violating their copyright(s). Can you describe the behavior you're … | |
Re: [URL="http://www.lmgtfy.com/?q=C%2B%2B+Tutorial"]Try Googling "C++ Tutorial"[/URL]. [URL="http://www.cplusplus.com/doc/tutorial/"]This one should have been one of your top search results[/URL]. There is a multitude of Free compilers and IDEs available. | |
Re: If you already know about Data Structures, you already know more about classes than you realize. "Under the hood" a struct and a class are the same. The only major difference is that a struct has a default access level of "public" while a class has a default access level … | |
Re: [QUOTE=mikrosfoititis;1714636]what about just [ICODE]int A[a][b][/ICODE]?[/QUOTE] Unfortunately, that's not technically allowed by many compilers because a and b are not constants. Since they are not constants, they are not known and the array can't be allocated at compile time. I hear it's technically legal under newer versions of the standards, but … | |
Re: Behold the dangers of a bad naming convention! :) You should consider changing the name of "id" within this function to something more like "incomingId" or "newId" so that you don't get it confused with book::id. This also helps prevent confusing your compiler (which is possible believe it or not). … |