Search Results

Showing results 1 to 40 of 179
Search took 0.08 seconds.
Search: Posts Made By: John A ; Forum: C++ and child forums
Forum: C++ Oct 6th, 2009
Replies: 3
Views: 174
Posted By John A
Duplicate: http://www.daniweb.com/forums/thread227874.html
Forum: C++ Oct 3rd, 2009
Replies: 2
c++
Views: 230
Posted By John A
http://www.daniweb.com/forums/thread227323.html
Forum: C++ Oct 3rd, 2009
Replies: 2
C++
Views: 175
Posted By John A
http://www.daniweb.com/forums/thread227323.html
Forum: C++ Sep 5th, 2009
Replies: 1
Views: 239
Posted By John A
Sounds like you're using main() instead of WinMain().
Forum: C++ Sep 3rd, 2009
Replies: 4
Views: 403
Posted By John A
Thread closed because a duplicate exists here: http://www.daniweb.com/forums/thread216043.html

Unless you can prove that there's something language-specific for this problem, there's no need to...
Forum: C++ Aug 28th, 2009
Replies: 12
Views: 424
Posted By John A
>Is that not possible when I am using a 2d array?
Of course not. You're using a 2D array; you need a row AND a column.
Forum: C++ Aug 19th, 2009
Replies: 2
Views: 528
Posted By John A
Lnk (http://catb.org/~esr/faqs/smart-questions.html)
Forum: C++ Aug 10th, 2009
Replies: 7
Views: 523
Posted By John A
>I can revive it once a while.
I doubt it.
Forum: C++ Aug 8th, 2009
Replies: 5
Views: 232
Posted By John A
http://www.daniweb.com/forums/thread209972.html
Forum: C++ Aug 1st, 2009
Replies: 1
Views: 277
Posted By John A
>is threr any way to read 'em?
Yes.

http://en.wikipedia.org/wiki/FASTA_format
Forum: C++ Aug 1st, 2009
Replies: 8
Views: 531
Posted By John A
>Yeah, of course, we have to use class functions, but where and how???
My guess would be you need to add functions where the "..." ellipsis are in the code. This is really something you need to ask...
Forum: C++ Aug 1st, 2009
Replies: 8
Views: 531
Posted By John A
>How can I access ID and Who in the waitNode???

// for example
head->waitHead->ID
head->waitTail->Who

They're all private members, so it all has to be accessed within a class function or a...
Forum: C++ Jul 31st, 2009
Replies: 11
Views: 492
Posted By John A
Forum: C++ Jul 31st, 2009
Replies: 16
Views: 795
Posted By John A
Do you know how to use inheritance to derive classes? Start by deriving Checking, Savings, and CD classes from BankAccount.
Forum: C++ Jul 31st, 2009
Replies: 16
Views: 795
Posted By John A
Well, what have you tried so far?
Forum: C++ Jul 30th, 2009
Replies: 4
Solved: bitwise stuff
Views: 211
Posted By John A
Perhaps take a look at bitset (http://www.sgi.com/tech/stl/bitset.html)?

Or you can do it "manually":
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1074727388&id=1073086407

Keep in...
Forum: C++ Jul 22nd, 2009
Replies: 3
Views: 740
Posted By John A
>Is this array initialization static or dynamic?
It's called a variable-length array (http://en.wikipedia.org/wiki/Variable-length_array), and as far as you're concerned, it's static. However, as...
Forum: C++ May 18th, 2009
Replies: 10
Views: 582
Posted By John A
That's because you didn't read (or didn't understand) what was said in this link:
http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12

The whole cause of the problem stems from the fact...
Forum: C++ Apr 29th, 2009
Replies: 6
Views: 1,185
Posted By John A
Well, start learning (http://www.winprog.org/tutorial/) Win32. The CreateWindow (http://msdn.microsoft.com/en-us/library/ms632679(VS.85).aspx) function will help you in creating buttons and textboxes.
Forum: C++ Apr 28th, 2009
Replies: 6
Views: 1,185
Posted By John A
The C++ standard doesn't define GUI elements, this is specific to the platform you plan to write it on. Even within an operating system like Windows, you still have choices about which interface...
Forum: C++ Apr 27th, 2009
Replies: 6
Views: 1,185
Posted By John A
What platform do you intend to write this on?
Forum: C++ Apr 27th, 2009
Replies: 6
Views: 526
Posted By John A
The same way you would add characters to a static array. The only difference being that you're responsible for allocating and deallocating the memory that 'arr' is going to point to.
Forum: C++ Apr 27th, 2009
Replies: 2
Views: 401
Posted By John A
>numarray = readFile(numarray[])
Remove the [] and it'll pass the address of the starting element of the array. You also don't need to bother returning the array, since you've passed the memory...
Forum: C++ Apr 26th, 2009
Replies: 3
Views: 242
Posted By John A
>int func4(int m, int n)
Assuming you're working with a string, not an integer, you need to adjust your parameter list accordingly.

Your function should loop through the string until it either...
Forum: C++ Apr 26th, 2009
Replies: 8
Views: 464
Posted By John A
>MyTemplate<SomeClass> var;
Most compilers will give you an error not only on the line that attempts to use a member that a derived template class doesn't possess, but also the line that the class...
Forum: C++ Apr 26th, 2009
Replies: 4
Views: 356
Posted By John A
Here's a start:


#include <fstream>
#include <iostream>
#include <cstdlib>
#include <ctime>

int main()
{
Forum: C++ Apr 26th, 2009
Replies: 8
Views: 464
Posted By John A
If you're only ever going to derive one class from your template, why are you making it a template?

Nevertheless, if for whatever reason you need it:...
Forum: C++ Apr 26th, 2009
Replies: 14
Solved: C++
Views: 907
Posted By John A
>im running Linux so i dont think i can view the XPS files.

1. Look directly below the XPS downloads, and you'll see PDF downloads.
2. FYI: http://www.artifex.com/downloads/
Forum: C++ Apr 26th, 2009
Replies: 8
Views: 423
Posted By John A
Why are you putting so much effort into shoehorning your code onto a dinosaur of a compiler? Yea, you may have "fixed" this issue but that's only one of hundreds of problems you'll encounter with a...
Forum: C++ Apr 25th, 2009
Replies: 3
Views: 389
Posted By John A
Now that you've posted your code, is there a question you'd like to ask?
Forum: C++ Apr 21st, 2009
Replies: 1
Views: 423
Posted By John A
http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.5
Forum: C++ Apr 21st, 2009
Replies: 18
Views: 3,200
Posted By John A
>can u post the finally source code?
I guess this is what Dani meant when she said we were getting 1000% more user registrations with a floating popup window.
Forum: C++ Apr 18th, 2009
Replies: 6
Views: 449
Posted By John A
>As long as you dont have any conflicting names, you get to omit std:: all over the place.
How do you know that other users of the code don't have ambiguity between STL members and their own...
Forum: C++ Apr 18th, 2009
Replies: 6
Views: 449
Posted By John A
>using namespace std;
That has got to be the worst possible thing you can do with the std namespace in a header file.
Forum: C++ Apr 18th, 2009
Replies: 6
Views: 449
Posted By John A
Try prefixing 'vector' with std::
Forum: C++ Apr 12th, 2009
Replies: 4
Views: 1,891
Posted By John A
That's pretty simple. Include the <ctime> header, then use the function localtime (http://www.cplusplus.com/reference/clibrary/ctime/localtime/). That does the converting process from time_t to a tm...
Forum: C++ Apr 11th, 2009
Replies: 1
Views: 362
Posted By John A
Make a function that takes 2 integers as parameters, and returns an integer.

You can print the result in hexadecimal form with the std::hex mode:

num = ANDoperation(0x0011, 0x0101);
std::cout...
Forum: C++ Apr 4th, 2009
Replies: 2
Views: 1,072
Posted By John A
http://www.parashift.com/c++-faq-lite/templates.html#faq-35.18
Forum: C++ Apr 4th, 2009
Replies: 7
Views: 323
Posted By John A
>I asked my instructor how to fix it and he told me the .eof was correct.
Well, there's nothing 'wrong' with eof(), you just need to understand that it will only indicate an EOF after an...
Forum: C++ Apr 4th, 2009
Replies: 7
Views: 323
Posted By John A
You're overwriting the first number in the file. You haven't counted whether the first line in the file is the number that the user entered. That's why your program only reported 3 occurrences of 64....
Showing results 1 to 40 of 179

 


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

©2003 - 2009 DaniWeb® LLC