Posts
 
Reputation
Joined
Last Seen
Ranked #73
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
94% Quality Score
Upvotes Received
387
Posts with Upvotes
341
Upvoting Members
184
Downvotes Received
25
Posts with Downvotes
25
Downvoting Members
15
105 Commented Posts
2 Endorsements
Ranked #621
Ranked #57
~804.84K People Reached
About Me

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"…
Favorite Tags

1,358 Posted Topics

Member Avatar for jimJohnson

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 …

Member Avatar for michealadejimi
2
12K
Member Avatar for eazy_man

:-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... …

Member Avatar for Koushik_3
-4
17K
Member Avatar for pags920

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.

Member Avatar for gravity_1
0
2K
Member Avatar for stefy14

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.

Member Avatar for amisha_1
0
58K
Member Avatar for Good Bye

[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) …

Member Avatar for Nihat_1
0
3K
Member Avatar for Bob

[QUOTE=jdumaine;1195710]When can you use a $ in a variable?[/QUOTE] You can't. That's why it wasn't mentioned.

Member Avatar for JamesCherrill
0
1K
Member Avatar for karthik16

[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). …

Member Avatar for Nick Evan
0
230
Member Avatar for Dave Sinkula
Member Avatar for shahidali6
11
10K
Member Avatar for zrd0808

Line 43, move the "[]" after the 'j' and see what happens. The braces need to be associated with the variable name, not the dataType.

Member Avatar for Schol-R-LEA
0
445
Member Avatar for kellnerq

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 …

Member Avatar for Victim_1
0
3K
Member Avatar for Q8iEnG

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.

Member Avatar for shayan_doust
0
740
Member Avatar for Doctor Inferno
Member Avatar for SgtMe
Member Avatar for fugnut

[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?

Member Avatar for deceptikon
0
3K
Member Avatar for DestinyChanger

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.

Member Avatar for saly305
0
2K
Member Avatar for leecheneler

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 …

Member Avatar for deceptikon
-1
101
Member Avatar for Kirielson

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]

Member Avatar for ankit1990rana
0
8K
Member Avatar for iamcreasy

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 >> …

Member Avatar for iamcreasy
0
269
Member Avatar for KellieD

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 …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for XerX

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]

Member Avatar for Bob
0
637
Member Avatar for Aghtar

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 …

Member Avatar for NathanOliver
0
134
Member Avatar for CppBuilder2006

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.

Member Avatar for aruldave
2
461
Member Avatar for StickyTape

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 …

Member Avatar for Crosby Grant
0
2K
Member Avatar for happygeek

[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 …

Member Avatar for jwenting
0
692
Member Avatar for KazenoZ

[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 …

Member Avatar for Shimano
0
1K
Member Avatar for emokidzz

[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 …

Member Avatar for samuelgray
0
405
Member Avatar for Hajira Khanum

[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.

Member Avatar for LRRR
1
107
Member Avatar for lucyaurora

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 …

Member Avatar for LdaXy
0
467
Member Avatar for PrimePackster

[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 …

Member Avatar for PrimePackster
0
316
Member Avatar for MugANDGlass

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). …

Member Avatar for MugANDGlass
0
360
Member Avatar for psandip

Any line that starts with '#' is [URL="http://en.wikipedia.org/wiki/Preprocessor_directive"]a "preprocessor directive"[/URL]. This particular one sounds like what is called [URL="http://en.wikipedia.org/wiki/Header_guard"]a "header guard" or an "inclusion guard".[/URL] It should be immediately followed by something along the lines of [CODE]#define _GLIBCXX_IOSTREAM 1[/CODE]. At the end of the file, there should also be a …

Member Avatar for Fbody
0
406
Member Avatar for Semeno

Something doesn't match up here. You have 9 fields in your struct, but there are only 8 fields in your records. Why do you have 2 "name" fields? Once you've straightened that out, test it again then post a better description of your problem; as I'm afraid I have no …

Member Avatar for NathanOliver
0
265
Member Avatar for dancks

I've never used Allegro, but look at Line 2 of your posted errors. It says that they are "Undefined Symbols". That would indicate to me that you are calling functions without declaring them first. For example:[CODE] #include <iostream> using std::cout; int main() { int someInt = someIntFunc(); return 0; } …

Member Avatar for dancks
0
300
Member Avatar for Nakeo

For starters, you're using out-of-date headers and you don't have any namespace resolution. The headers <stdio.h>, <stdlib.h>, <ctype.h>, <errno.h>, <string.h> and <iostream.h>. Are the old versions of the standard headers. You should use <cstdio>, <cstdlib>, <cctype>, <cerrno>, <cstring> and <iostream> respectively instead. Perhaps this will explain most of your problems: …

Member Avatar for Nakeo
0
209
Member Avatar for iv54

Very few RNGs actually produce truly random values. The numbers are actually the result of a mathematical formula that produces a random-looking sequence of numbers. The seed tells the RNG where to start in the sequence. Your code probably works every time, but because the code executes so fast the …

Member Avatar for Fbody
0
175
Member Avatar for Thermalnuke

You can't define a function inside another function. Look at Lines 39 and 40. Is something missing there? This is where you main() should end, but it doesn't end until Line 84. By the way, I know that Line 84 doesn't exist, that's my point. You need to pay closer …

Member Avatar for WaltP
0
188
Member Avatar for MediumSoda

The Ctrl+X key combination produces an End Of File (EOF) and associated error condition on the input stream. Figure out how to detect it and reset the stream then go from there. [URL="http://www.daniweb.com/software-development/cpp/tutorials/90228"]This thread may help too[/URL].

Member Avatar for MediumSoda
0
441
Member Avatar for sita12345

If you tell us what you expect the program to do and how what it's actually doing differs from the expected, we may be able to help you. Until you establish your intent though, we can not help you because we don't know what behavior is considered correct and therefore …

Member Avatar for Fbody
0
101
Member Avatar for vincent5487

[URL="http://www.sorting-algorithms.com/"]Here is a good place to start looking at sorting algorithms[/URL]. Being new, you'll want to study the Bubble Sort and Insertion Sort algorithms as they are the simplest to learn. Not sure if it will help or not, but here is an example Bubble Sort (in FreeBASIC):[CODE=vb] #define FALSE …

Member Avatar for Fbody
0
440
Member Avatar for arubajam

[QUOTE][CODE]#include <iostream> using namespace std; const int NUM_TEACHERS = 3;[/CODE][/QUOTE] Other than having a generic namespace resolution, this is all good. [QUOTE][CODE]class Teacher { public: Teacher(); private: char name[40]; int teacherID; char class[20]; };[/CODE][/QUOTE] This class declaration is a decent declaration. You remembered the semi-colon at the end, that's a …

Member Avatar for arubajam
0
192
Member Avatar for physicist

It will also be necessary to change the <math.h> header to <cmath> and resolve the [B]std[/B] namespace by some means. Additionally, if you want to use cout, you'll need the <iostream> header.

Member Avatar for Schol-R-LEA
0
416
Member Avatar for nyuszi

[QUOTE=nyuszi;1704193]here is the array: 1 42 23 14 2 23 41 15 3 63 17 18 4 3 24 15 5 32 42 13 6 34 56 78 7 22 32 4 8 35 46 3 the problem: if the last number is the lowest then l=x[i][j] and the program …

Member Avatar for nyuszi
0
142
Member Avatar for kingcong83

[QUOTE=Moschops;1704265]The opinion of Stroustup pales in comparison to the actual C definition. There is no need to appeal to authority when you can read the words yourself. Section 5.1.2.2.1 of the actual C99 definition closes "or in some other implementation-defined manner" which allows for [B]void main()[/B] Here is a simple …

Member Avatar for Schol-R-LEA
0
157
Member Avatar for salah_saleh

I have a feeling you're getting 2 different concepts jumbled together here. Specifically, make files and Command Line Arguments (CLAs). Are these files source code that you are trying to compile into finished executable code or are they text/data files that you want to pass the names of to your …

Member Avatar for Fbody
0
446
Member Avatar for TaoNinja

[QUOTE=Schoil-R-LEA;1698842]I agree with Rohan121212; you need to give more specifics about the program. The answer to the question would depend on just how the end of the loop is indicated. If you are given a number of cases to enter before the loop begins, then it is fairly straightforward: [code] …

Member Avatar for frogboy77
0
447
Member Avatar for pnoylover

For starters, get rid of the "up:" label and the "goto up;" jump statement (Lines 24 and 48 respectively), they are of no use to you as that's what your do-while loop is for. Next. Please clearly explain exactly what the problem is; a statement like "I just can't get …

Member Avatar for raptr_dflo
0
202
Member Avatar for PrimePackster

[B]>>Nick, it a common convention in C++ to put statements as compound statements....Mostly to make it more compact or less complicated....So now the whole Nested if is a compound statement....[/B] Yes, it is, but there is no point in making Lines 27-32 a compound statement; it doesn't accomplish anything for …

Member Avatar for Fbody
0
357
Member Avatar for nadavr
Member Avatar for Fbody
0
128
Member Avatar for duttydane

Looks like a worth while homework assignment. [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]What have you done so far?[/URL]

Member Avatar for tkud
0
160
Member Avatar for sjcomp

I don't know anything about a "singleton pattern" but my guess is this is one part of your problem: [CODE]protected: /// Pointer to the singleton object static T* s_Singleton;[/CODE] While a protected status is less-restrictive than private. It simply means that inherited objects can now have access to it, but …

Member Avatar for madGambol
0
251

The End.