Forum: C++ Oct 17th, 2007 |
| Replies: 1 Views: 1,197 Hello there ive written my own linklist in a template way but it doesnt seem to want to work when i add classes rather than primitive data types to the list...
heres the code:
[the node itself... |
Forum: C++ Jun 18th, 2006 |
| Replies: 5 Views: 1,424 I was trying to deferencing it as a Global peice of code.
it works in a fuction. Now for my next question...
i have the following lines of code .. they dont work correctly or compile but its... |
Forum: C++ Jun 18th, 2006 |
| Replies: 5 Views: 1,424 no i'm trying to get an aray of structures. and then dereferencing them.. |
Forum: C++ Jun 18th, 2006 |
| Replies: 5 Views: 1,424 typedef struct Cell
{
int north,south,east,west;
int RD;
bool visited;
} Cell_Info;
Cell_Info a[100]; |
Forum: C++ Jun 1st, 2006 |
| Replies: 5 Views: 1,391 You need to type them. eg
to delcare a string of names you have to specify the array is a string that holds X amount ...
string Names[100]
also another thing why are you pasing MAXSIZE to... |
Forum: C++ Jun 1st, 2006 |
| Replies: 5 Views: 1,391 |
Forum: C++ Apr 12th, 2006 |
| Replies: 3 Views: 1,098 yeh it appears to be does it not? |
Forum: C++ Apr 12th, 2006 |
| Replies: 3 Views: 1,098 Hell ive written some code :
#include <iostream>
#include <string>
using namespace std;
int main() |
Forum: C++ Apr 7th, 2006 |
| Replies: 1 Views: 1,137 #include <iostream>
#include <string>
#include "scanner.h"
using namespace std;
void program(string &sym);
void body(string &sym); |
Forum: C++ Apr 5th, 2006 |
| Replies: 5 Views: 1,680 right here we go:
main.cpp:
#include <iostream>
#include <iostream>
#include <string>
#include <fstream> |
Forum: C++ Apr 5th, 2006 |
| Replies: 5 Views: 1,680 Sorry naure i forgot to include the header file...
Code_table[]. ... is correct since ive got an array of structs declared.
Anyway im getting the following errors now:
Thanks... |
Forum: C++ Apr 4th, 2006 |
| Replies: 5 Views: 1,680 hello, ive got my code but ive split it up. however i keep getting the following errors:
The H file that i want to access:
#ifndef TABLES_H
#define TABLES_H |
Forum: C++ Mar 25th, 2006 |
| Replies: 2 Views: 1,033 there was no errors jiust logical ones since the file wasn't outputing to the screen |
Forum: C++ Mar 25th, 2006 |
| Replies: 2 Views: 1,033 Hello folks my fstream system appears to have failed!
it all worked until i split the file up into *.H and *.CPP.
// header file
#include <string>
#include <fstream>
#ifndef SCANNER_H |
Forum: C++ Feb 23rd, 2006 |
| Replies: 6 Views: 1,726 I like that but never done it , could you explain in detail? |
Forum: C++ Feb 21st, 2006 |
| Replies: 1 Views: 2,054 4 words:
we dont do homework! |
Forum: C++ Feb 21st, 2006 |
| Replies: 6 Views: 1,726 fair enough I'm going to use a link list since the idea of a 3 dimensional array is over complex for such a task |
Forum: C++ Feb 21st, 2006 |
| Replies: 6 Views: 1,726 Hello,
I've got a 2 diemsional array that ments to represent this:
Name Address
A 1
B 2
C 3
I've got the following code written for this: |
Forum: C++ Feb 18th, 2006 |
| Replies: 1 Views: 1,515 Whilst I shouldnt have posted the entire code up, I see no other option :(
#include <iostream> // cout << endl ...
#include <fstream> // for reading in the file ...
#include <string> // for... |
Forum: C++ Feb 16th, 2006 |
| Replies: 1 Views: 933 Hello 2 questions, when you've got this:
char * array = new char[20];
creates a dynamic array of 20, if on run time the array needs to be 40 how could this be accomplished? I've thought i'd... |
Forum: C++ Feb 12th, 2006 |
| Replies: 4 Views: 14,232 while file is open
do{
ch = the string
string compare ch with "eat"
if ch == eat
stop
}
close the file |
Forum: C++ Feb 11th, 2006 |
| Replies: 9 Views: 1,460 Hello thanks the latter fixed the bug. However another as as pop'd up. putting bbb+11 into the text file creates the following outpout:
Hmm it doesnt like the plus symbol even though ive put a... |
Forum: C++ Feb 10th, 2006 |
| Replies: 9 Views: 1,460 hmm yes strings sound like an option however chars are needed for this projct myfriend. I was just wondering how I'd be able to get rid of all those junkand only return bbb. instead of bbb and... |
Forum: C++ Feb 10th, 2006 |
| Replies: 9 Views: 1,460 hmm only problem with that is i get 'bbb====&^%$$%%&' i only want bbb. |
Forum: C++ Feb 10th, 2006 |
| Replies: 9 Views: 1,460 but won't this meanthat getsym will take parameters? Since it can't :( |
Forum: C++ Feb 10th, 2006 |
| Replies: 9 Views: 1,460 Hello, I've got a function that returns a memory addres of an array. However making the char * static seems to be the only solution. However it since its static it doesnt get cleaned out so... |
Forum: C++ Feb 9th, 2006 |
| Replies: 2 Views: 959 #include <iostream>
#include <fstream>
using namespace std;
char RW[10];
char id[10];
void populateArray(char ch, int &i, char * array);
void valid(char *array, int i); |
Forum: C++ Feb 8th, 2006 |
| Replies: 4 Views: 2,039 Hello sorry for my none explantation, here it goes... Ive got 2 popluated arrays...
array = "a+b*c;
RW = "+*;"
I want to scan or go through and compared array to RW and if the characters... |
Forum: C++ Feb 7th, 2006 |
| Replies: 4 Views: 2,039 hello ive got 2 arrays defined below
char RW[100];
char array[80];
ive got this algo for now but not 100% certain its working |
Forum: C++ Feb 7th, 2006 |
| Replies: 1 Views: 1,506 //parsing (a,d,n)
#include <iostream>
using namespace std;
char getsym();
void L(char sym); |
Forum: C++ Feb 6th, 2006 |
| Replies: 3 Views: 1,355 Well what have you got written so far? We don't do homework for others! |
Forum: C++ Feb 3rd, 2006 |
| Replies: 15 Views: 3,786 I follow the rest but i can't do this since the option is not valid, its grayed out... |
Forum: C++ Feb 3rd, 2006 |
| Replies: 15 Views: 3,786 since your way wouldnt work either , I've come up with this code which works but still leaves the gray are...
BOOL CHangmanDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code... |
Forum: C++ Feb 3rd, 2006 |
| Replies: 15 Views: 3,786 Hello, thanks for your reply I got it to paint my background blue..wahoo , howver where theres text or a label the area around it still stays gray. I think I've found a function:
int SetBkMode(... |
Forum: C++ Feb 2nd, 2006 |
| Replies: 2 Views: 1,116 Ok am I missing something or have you not attempted the code since you say you get an error on the screen. To me thats not C / C++ . . .
Can you post your code? Does it have to be in OOPS (C++)... |
Forum: C++ Feb 2nd, 2006 |
| Replies: 15 Views: 3,786 As regards to question 1 I'm trying to put the circle at a set point on the screen. See here:
www.bsc-coding.com/temp/screenie.png
However I'm finding myself entering different co-ordinates... |
Forum: C++ Feb 2nd, 2006 |
| Replies: 15 Views: 3,786 Thanks for the reply, it seems to have done the trick, is they a way of getting a set of co-ordinates on the screen? I want it the fursthers right but a very small cirlce. I've been filling it with... |
Forum: C++ Feb 2nd, 2006 |
| Replies: 15 Views: 3,786 I get one more error:
I've edited the following:
the print protoypte now reads:
void print(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); |
Forum: C++ Feb 2nd, 2006 |
| Replies: 15 Views: 3,786 I get this error when trying to call a premade function:
Whilst I'm not understanding the code very well, I've gone away and implemented a print function:
void classname::print()
{
BOOL... |
Forum: C++ Feb 1st, 2006 |
| Replies: 15 Views: 3,786 Hello, I'm wanting to print a circle to a screen, or should I say on a form. Any ideas?
Thanks |