Search Results

Showing results 1 to 31 of 31
Search took 0.01 seconds.
Search: Posts Made By: chococrack ; Forum: C++ and child forums
Forum: C++ Dec 4th, 2008
Replies: 6
Views: 543
Posted By chococrack
Post your code.
Forum: C++ Dec 3rd, 2008
Replies: 21
Views: 1,735
Posted By chococrack
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,735
Posted By chococrack
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,735
Posted By chococrack
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,735
Posted By chococrack
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,735
Posted By chococrack
try returning ' ' instead of " ", don't know why but something tells me it might work
Forum: C++ Nov 19th, 2008
Replies: 10
Views: 690
Posted By chococrack
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: 690
Posted By chococrack
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: 690
Posted By chococrack
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,385
Posted By chococrack
#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: 668
Posted By chococrack
Trust me, all of our first attempts were without doubt riddled with errors.
Forum: C++ Oct 21st, 2008
Replies: 9
Views: 668
Posted By chococrack
#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: 668
Posted By chococrack
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: 668
Posted By chococrack
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: 575
Posted By chococrack
ar[x][y]

it was a 2d array wasn't it?
Forum: C++ Oct 18th, 2008
Replies: 7
Solved: schedule time
Views: 891
Posted By chococrack
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
Solved: schedule time
Views: 891
Posted By chococrack
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,370
Posted By chococrack
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
Solved: Help......
Views: 507
Posted By chococrack
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
Solved: Help......
Views: 507
Posted By chococrack
#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
Solved: Help......
Views: 507
Posted By chococrack
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
Solved: Help......
Views: 507
Posted By chococrack
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
Solved: Help......
Views: 507
Posted By chococrack
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
Posted By chococrack
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
Posted By chococrack
Nevermind. Damn. Got to it in time.
Forum: C++ Oct 16th, 2008
Replies: 18
Views: 1,708
Posted By chococrack
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: 619
Posted By chococrack
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,137
Posted By chococrack
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
Solved: String function
Views: 657
Posted By chococrack
Ooo this one is more helpful: http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html
Forum: C++ Oct 8th, 2008
Replies: 8
Solved: String function
Views: 657
Posted By chococrack
The link I posted should solve your problem.
Forum: C++ Oct 8th, 2008
Replies: 8
Solved: String function
Views: 657
Posted By chococrack
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...
Showing results 1 to 31 of 31

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC