Forum: C++ 1 Hour Ago |
| Replies: 10 Views: 100 Look closely.. something isn't right here.
//line #66, parameter list
float calculateGrossPay ( char ps [ ], int input [ ], float [ ] , int size) |
Forum: C++ 1 Hour Ago |
| Replies: 4 Views: 30 One thing I notice is that on line #48 you make this assignment:
b = a;
and then on line #30 you totally undo the previous operation with each loop iteration:
b = start +i;
So I'm not... |
Forum: C++ 1 Hour Ago |
| Replies: 4 Views: 47 good catch..
i need to get a compiler on me' old laptop.
They have spell check on here.. why don't they have code check ;) |
Forum: C++ 2 Hours Ago |
| Replies: 10 Views: 100 I'll put down my crack pipe now and state the arrays can only be passed by reference.. what was I thinking... |
Forum: C++ 2 Hours Ago |
| Replies: 7 Views: 55 The 'curl' api as provided by Jonsca might be more related to what you want to do.. I've just been browsing activex tutorials myself and mainly see ways to create web based controls (buttons, edit... |
Forum: C++ 2 Hours Ago |
| Replies: 4 Views: 47 What you are saying resembles english and seems quite insightful, so I will offer you this:
#include<iostream>
int* get_address(int&);
int main()
{
int number = 0; |
Forum: C++ 2 Hours Ago |
| Replies: 7 Views: 55 I believe that when it comes to bridging the gap between programming and the internet, people seem to recommend the use of activex (http://msdn.microsoft.com/en-us/library/ms974283.aspx)
The... |
Forum: C++ 3 Hours Ago |
| Replies: 5 Views: 98 What you are tasked to do is not really that difficult.. what part of the assignment is giving you the greatest difficulty? |
Forum: C++ 3 Hours Ago |
| Replies: 10 Views: 100 I believe that this may be related to your problem..
You are passing in objects to your functions 'by value' which necessitates the need to save a return value from your functions.
//you create... |
Forum: C++ 4 Hours Ago |
| Replies: 10 Views: 203 In that case, you either have to do this:
//line #18
int numVowels;
Or this:
//line #114
return &numVowels; |
Forum: C++ 4 Hours Ago |
| Replies: 10 Views: 203 Try the following:
case 'A': cPtr = getStringFromUser();
numVowels = vowels(cPtr);
break; |
Forum: C++ 4 Hours Ago |
| Replies: 2 Views: 42 What part of the assignment is giving you difficulty.. ?
After breifly looking at your attachment, it seems that the assignment is already well outlined for you.. all you have to do is create a... |
Forum: C++ 4 Hours Ago |
| Replies: 6 Views: 119 I agree with twomers, using cin seems to be a 'safer' method than using getline(), (http://www.cplusplus.com/reference/iostream/istream/getline/)in that cin will (unless something wack happens) will... |
Forum: C++ 16 Hours Ago |
| Replies: 3 Views: 90 In my opinion, I think it's possible to decompile an .exe into a somewhat hackish assembly code.... where if a person has a lot of time on their hands, could do a translation from assembly to a... |
Forum: C++ 16 Hours Ago |
| Replies: 3 Views: 80 Do you like long walks on the beach |
Forum: C++ 16 Hours Ago |
| Replies: 2 Views: 117 1. Create an ifstream object.
2. Create an ofstream object.
3. Attempt to open Expenses.txt using your ifstream object.
4. Perform error checking to see if Expenses.txt actually exists.
5. ... |
Forum: C++ 1 Day Ago |
| Replies: 4 Views: 118 You are right on brother.
One suggestion: whenever you see a self re-assignment, you should have "compound operator" runnin' through your noggin'
y = y + 1;
//is the same thing as
y +=... |
Forum: C++ 2 Days Ago |
| Replies: 7 Views: 180 Either way, the principle remains the same.
1. accept user inputs into an array of appropriate type
2. use a loop to achieve desired output (which in this case is to display the array reverse... |
Forum: C++ 2 Days Ago |
| Replies: 3 Views: 105 I'm not sure if this is related to your problem, but I'm pretty sure you aren't allowed to just declare arrays of a given size on demand:
cout <<endl<<"Please enter the size of the array you want... |
Forum: C++ 2 Days Ago |
| Replies: 7 Views: 180 To be quite honest, I believe it is possible to use any type of loop structure for any given situation. But yes, 'for' loops seem to be the defacto standard when it comes to array operations... but... |
Forum: C++ 2 Days Ago |
| Replies: 7 Views: 180 For most assignments of this nature, most go with storing user input into a cstring.. then use a loop to display the contents of the string in reverse order.
Simple. Straight-forward. |
Forum: C++ 2 Days Ago |
| Replies: 1 Views: 105 You are attempting to perform a switch test on a char[50] array. In c++, the switch structure is designed to perform tests on the current state of a single integral expression (the most commonly... |
Forum: C++ 2 Days Ago |
| Replies: 10 Views: 203 I think someone needs a hug. |
Forum: C++ 2 Days Ago |
| Replies: 10 Views: 203 pointer-type variables hold memory addresses.. just like int's hold integers, char's hold ascii values etc.
Although I do not agree with your current scheme of prompting for user input after a... |
Forum: C++ 3 Days Ago |
| Replies: 11 Views: 208 Line #23: you have an unecessary } curly brace
main() does not return any value, although you have it prototyped to return an 'int'.
Line #25: should be // commented out
You should have a... |
Forum: C++ 3 Days Ago |
| Replies: 3 Views: 112 I see that you seem to be interested in using <string> class member functions (http://www.cplusplus.com/reference/string/string/)for your parsing needs. May I suggest the following which uses... |
Forum: C++ 3 Days Ago |
| Replies: 4 Views: 183 Here is a possible pseudo-code for what ye' wish to accomplish:
1. Prompt the user for 5 numbers:
do{
cout << "Enter a number: ";
cin >> user_picks[i];
i++;
}while(i<5); |
Forum: C++ 3 Days Ago |
| Replies: 11 Views: 208 I'm not sure what you are trying to do, but maybe this will help:
//Function Prototype
char get_grade(int&);
//Display Grades
for(int i=0; i<10; i++)
{
cout << students[i] << " scored... |
Forum: C++ 3 Days Ago |
| Replies: 3 Views: 140 Your mixing of >> extraction and use of getline() combined with your complaint of segmentation fault warrants the viewing of your .txt file data format.
Here is your attempt to read in the .txt... |
Forum: C++ 3 Days Ago |
| Replies: 3 Views: 140 As with any file I/O, I will need to see how your txt file data is formated.. white spaces and new lines are important factors to consider when trying to troubleshoot file I/O. |
Forum: C++ 3 Days Ago |
| Replies: 2 Views: 115 In the evaluation of polynomial expressions, it is safe to treat all " - " minus signs as preceding negative numbers (it is safe to assume there is no subtraction). The only special case one must... |
Forum: C++ 11 Days Ago |
| Replies: 11 Views: 337 Try this funciton from <algorithm> (http://www.cppreference.com/wiki/stl/algorithm/start)
#include<algorithm>
int array[10000];
fill(&array[0], &array[10000], 0); |
Forum: C++ 12 Days Ago |
| Replies: 1 Views: 190 int size = sizeof(array) / sizeof(array[0]);
#include<algorithm>
sort(array[0], array[size]); |
Forum: C++ 12 Days Ago |
| Replies: 8 Views: 294 I am aware of this.. I was just trying to demonstrate how you could create a bunch of objects of a certain class and know that all those objects have been initialized via the class default contructor. |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 212 Although I am by no means a network administrator, this assignment doesn't really seem that overly complex...
Here (http://www.tech-faq.com/ip-address-classes.shtml) is how one can determine the... |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 135 I would then suggest maybe trying a char hex[20][20] array. (This will be a char[row][column] 20x20 square array).
Initialize all the array elements to a white space:
for(int i=0; i<20; i++)
... |
Forum: C++ 13 Days Ago |
| Replies: 3 Views: 135 This should give ye' at least an idea. I'll draw half of the hexagon, ye' can do the rest. This is untested, but feel free to tweak it as necessary to draw that perfect hexagon:
... |
Forum: C++ 13 Days Ago |
| Replies: 2 Views: 152 You declare main() to return an 'int' type... but nowhere do you have a 'return' statement in your main() function.
int main()
{
...
...
yadda yadda
....
...
etc etc. |
Forum: C++ 13 Days Ago |
| Replies: 2 Views: 195 char ans = '\0';
int i=0;
do{
cout << "\nEnter a number: ";
cin >> arr[i];
cout << "\nWould ye' like to enter another number? (Y/N) ";
cin >> ans; |
Forum: C++ 14 Days Ago |
| Replies: 4 Views: 246 Try using getline(cin, user_input);
edit: went to go take a wiz, when I came back ya'll had the answers already. |