Forum: Legacy and Other Languages Apr 30th, 2008 |
| Replies: 1 Views: 1,270 No one has any idea?
start of rant:
MSDN Forums are dead, no one is using J#, my lecturer is useless.. why force us to use this language with such limited support docs, examples, etc... |
Forum: Legacy and Other Languages Apr 24th, 2008 |
| Replies: 1 Views: 1,270 Hi, I have this issue with a J# project I need to complete for uni.
public class Sprite
{
private Image m_image;
public Sprite(Image image)
{
m_image = image;
} |
Forum: C++ Dec 17th, 2007 |
| Replies: 4 Views: 765 BIG EDIT:
so sorry, I know see that I was debugging the wrong source file, not the updated one. Your algorithm works perfectly, can't thank you enough :-)
I'm going to read up on string streams... |
Forum: C++ Dec 15th, 2007 |
| Replies: 2 Views: 1,895 As you can see I'm still getting my head round pointers, particularly in terms of arrays and dynamic memory allocation.
From your suggestions I just corrected the prototype declaration to return a... |
Forum: C++ Dec 15th, 2007 |
| Replies: 4 Views: 1,096 To get better help than this response you'd probably want to mention which version of dev-cpp you're trying, what operating system you're using, and you'd likely want to direct your questions to the... |
Forum: C++ Dec 15th, 2007 |
| Replies: 2 Views: 1,895 Hi,
Firstly, this is Win32 console related, otherwise I'd be reading up on the ncurses library..
My program is updating name:value pairs like Name:John
I wish to use WriteConsoleInput to... |
Forum: C++ Dec 13th, 2007 |
| Replies: 4 Views: 765 that seems pretty smart, I'm giving it ago :-)
Just noticed your avatar
You should meet my lecturer - we're always pulling him up over the void main()s |
Forum: C++ Dec 13th, 2007 |
| Replies: 4 Views: 765 Hi,
I am storing strings in '|' delimited format in a text file. Each new line represents a new record.
for instance |Name|Age|Favcolour|
|Name2|Age2|Favcolour2|
I'm using a string vector to... |
Forum: C++ Dec 4th, 2007 |
| Replies: 8 Views: 1,422 You know it's funny, you've totally spun things I was semi-confident about on their head...
Thanks a million!
But seriously... I need to find some better literature...
My 'beginners guide' is... |
Forum: C++ Dec 4th, 2007 |
| Replies: 8 Views: 1,422 I know this is probably daft, but wasn't I including the same header file multiple times in drawScr.cpp and main.cpp? |
Forum: C++ Dec 4th, 2007 |
| Replies: 8 Views: 1,422 I was sure that was the point of the preprocessor directives #ifndef etc... back to the books for me, I think :-)
Thanks, it really does. I obviously need to revisit the chapters on pointers... |
Forum: C++ Dec 4th, 2007 |
| Replies: 8 Views: 1,422 Hi,
Despite triple checking my code for duplication and checking that the headers include #ifndef I still can't trace what is causing this error message:
drawscr.o(.bss+0x0):drawscr.cpp: multiple... |
Forum: C++ Nov 21st, 2007 |
| Replies: 8 Views: 1,705 I did read about all the modifiers etc of the string class, here: http://www.cplusplus.com/reference/string/string/
Just my lecturer in uni never wrote in his notes that I had to have using... |
Forum: C++ Nov 21st, 2007 |
| Replies: 8 Views: 1,705 While watching the newstr value in VS debugger,
after newstr[j] = ' ';
the string was updated to be the same length as str and had {" ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ"} as it's value.
(First charcter is a space... |
Forum: C++ Nov 21st, 2007 |
| Replies: 8 Views: 1,705 Still having problems, and the culprit is definelty the string.erase modifier.
Does this modifier have to be called by reference ( I mean by a pointer to a string) and the other statements like... |
Forum: C++ Nov 21st, 2007 |
| Replies: 8 Views: 1,705 Use if (isspace(ch)) to move past whitespaces. Then when find next non whitespace character, copy a space, then the character, then move on? |
Forum: C++ Nov 21st, 2007 |
| Replies: 8 Views: 1,705 Hi, me again!
I wish to tidy up strings from user input. I have done a bit of research and have most of this working except the tricky bit - converting all/any whitespace between words to 1 ' '... |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 HI Narue,
Sorry I didn't mean to ask you to hold my hand.
For now I'll leave it as it is and see how it bears under testing.
I just shoved this in place of the 1st if(...) break;
if... |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 What site are you talking about?
is the recursive function the if inside the do...while? |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 That's working but if the idea is a bad one , let me know :-) |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 sorry my mistake when typing it in.
OK so I will return a date of 00000000 instead of the first break, does that seem like the correct way out of this? |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 Thinking the problem is maybe trying to return a Date which hasn't any values. So maybe I should replace the first break, with a return - but how would I return a blank date? |
Forum: C++ Nov 21st, 2007 |
| Replies: 9 Views: 5,690 hi,
I'm checking a date is valid as it's typed in, however I always want to allow the user to skip with a CR.
The while condition is causing my program to crash when str_date.length()==0 (I... |
Forum: C++ Nov 21st, 2007 |
| Replies: 4 Views: 2,748 I know I marked this as solved, but if I used the istringstream method, how would I then split the integer into individual ints for d, m & y? |
Forum: C++ Nov 21st, 2007 |
| Replies: 4 Views: 2,748 I'm stupid, and can see how to do it,
atoi(dob.substr(2,3).c_str());
sorry everyone ! :-) |
Forum: C++ Nov 21st, 2007 |
| Replies: 4 Views: 2,748 Hi I wish to break up a date entered as a string into ints for day, month, year.
String to be entered follows this convention DDMMYYYY - this will be checked so we can presume it's suitable.
I... |