Forum: C++ Dec 4th, 2008 |
| Replies: 6 Views: 526 |
Forum: C++ Dec 3rd, 2008 |
| Replies: 21 Views: 1,723 Also, whats the value of strlen(customer) at that point? Make sure its not falling off the array (just as an extra thing to look at possibly). |
Forum: C++ Dec 3rd, 2008 |
| Replies: 21 Views: 1,723 Well thats not very nice of it then :<
What class is getData function in and what does it look like? |
Forum: C++ Dec 3rd, 2008 |
| Replies: 21 Views: 1,723 If its just a problem with retreiving the private member, why not just create a public function within that class to grab the private value and return it:
int getPrivateThingy()
{
return... |
Forum: C++ Dec 3rd, 2008 |
| Replies: 21 Views: 1,723 http://msdn.microsoft.com/en-us/library/6decc55h(VS.80).aspx
So meh.. wants us to look at parameters first I take it |
Forum: C++ Dec 3rd, 2008 |
| Replies: 21 Views: 1,723 try returning ' ' instead of " ", don't know why but something tells me it might work |
Forum: C++ Nov 19th, 2008 |
| Replies: 10 Views: 657 alrighty, so with those specific numbers the output looks like this:
How many colors will there be? 3
How many rounds? 5
How many assemblers/painters? 3
Enter start state for game (make... |
Forum: C++ Nov 19th, 2008 |
| Replies: 10 Views: 657 I was prepared for the possibility that they would solve nothing. Alright I'm going to look at your code a little bit more and see if I can find anything else. |
Forum: C++ Nov 19th, 2008 |
| Replies: 10 Views: 657 Plu-cha... before I go diving into analyzing 2d arrays and such, I want to see if maybe the following easy fixes help anything:
-- Semi-colons.
while(roundNum<column)
{
cout<<"Enter... |
Forum: C++ Oct 31st, 2008 |
| Replies: 10 Views: 1,361 #include <iostream>
using namespace std;
bool Palindrome(string pal, int index, int length)
{
while(index < length)
{
if (length == 0 || length == 1) |
Forum: C++ Oct 21st, 2008 |
| Replies: 9 Views: 663 Trust me, all of our first attempts were without doubt riddled with errors. |
Forum: C++ Oct 21st, 2008 |
| Replies: 9 Views: 663 #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
// Function declarations
char menu();
void circle();
void rectangle();
void triangle(); |
Forum: C++ Oct 21st, 2008 |
| Replies: 9 Views: 663 Oh my wow.
You are redeclaring every variable you already declared in main. You are re-doing a switch for choice unecessarily in every function, you do not need to do all these things. Let... |
Forum: C++ Oct 21st, 2008 |
| Replies: 9 Views: 663 void circle()
{
double circleArea, rectangleArea, triangleArea,
length, width, height, base, radius;
char choice;
const double PI = 3.14159;
switch (choice)
{ |
Forum: C++ Oct 19th, 2008 |
| Replies: 8 Views: 572 ar[x][y]
it was a 2d array wasn't it? |
Forum: C++ Oct 18th, 2008 |
| Replies: 7 Views: 859 That also seems more efficient than what I had in mind, which was running a task that would check systemdate for saturday and execute "whatever" once on that day. |
Forum: C++ Oct 18th, 2008 |
| Replies: 7 Views: 859 Here a link that gives a code example to:
"create a task that is scheduled to execute Notepad on a weekly basis. The task contains a weekly trigger that specifies a start boundary, a weeks interval,... |
Forum: C++ Oct 18th, 2008 |
| Replies: 12 Views: 1,315 int main()
{
int AccountNumber, loop, loopEnd;
double InputBalance, MinimumBlanace, FinalBalance, CheckTopLimit;
char AccountType;
bool validAccount = false;
ofstream fout;
ifstream... |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 503 Well, what I ended up doing is making a function to draw the whole setting (drawSetting) - the stick person, the box, the platform, etc etc.
The cleardevice() function clears the whole screen... |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 503 #include <iostream>
#include <conio.h>
#include <graphics.h>
// using namespace std;
void drawSetting(); // Function to redraw everything
int main(void) |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 503 for(pos_x=i_pos_x;pos_y>0;pos_x++)
{
time=(pos_x-i_pos_x)/vel_x;
pos_y=i_pos_y-(vel_y*time)+(9.81*time*time);
// lineto((int)pos_x,(int)pos_y);
circle(pos_x,pos_y,10);
... |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 503 Alright so I got the line to go further with this here:
for(pos_x=i_pos_x;pos_x<555;pos_x++)
my suggestion is something along the line of instead of having pos_x < XXX have it say something... |
Forum: C++ Oct 18th, 2008 |
| Replies: 8 Views: 503 int main()
to begin... more to follow...
Does your compiler fuss at you for not having header files or anything?
Ahh I see what the problem is.. the arch is stopping or getting too slow. ... |
Forum: C++ Oct 16th, 2008 |
| Replies: 4 Views: 324 I didn't see the need for it, especially since you already stated what the acceptable inputs were. It's true that you don't want to allow erroneous inputs, but its not a pace-maker application. |
Forum: C++ Oct 16th, 2008 |
| Replies: 4 Views: 324 Nevermind. Damn. Got to it in time. |
Forum: C++ Oct 16th, 2008 |
| Replies: 18 Views: 1,658 numbers[insertItem-1] = insertItem;
Does this mean if you insert, oh i dont know, "6432", it goes into numbers[6431]???
If it does I'd look at it again, because I don't think that's what you... |
Forum: C++ Oct 16th, 2008 |
| Replies: 7 Views: 603 Data superStruct;
superStruct.name = thatLastNameIRead;
superStruct.address = thatAddressIRead;
int mySuperKey = thatKeyIRead;
myBST.insert(thatKeyIRead, superStruct);
What is the question? |
Forum: C++ Oct 10th, 2008 |
| Replies: 8 Views: 1,090 dis:
for(int i=0; i<5; i++)
{
for(int j=0; j<5; i++)
cout << "*"
cout << endl;
} |
Forum: C++ Oct 8th, 2008 |
| Replies: 8 Views: 651 Ooo this one is more helpful: http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html |
Forum: C++ Oct 8th, 2008 |
| Replies: 8 Views: 651 The link I posted should solve your problem. |
Forum: C++ Oct 8th, 2008 |
| Replies: 8 Views: 651 http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html
strcmp:
Compares the C string str1 to the C string str2.
This function starts comparing the first character of each... |