Search Results

Showing results 1 to 40 of 81
Search took 0.01 seconds.
Search: Posts Made By: jencas
Forum: C++ Oct 12th, 2009
Replies: 3
Solved: file.close
Views: 228
Posted By jencas
Maybe a file2.clear() would be helpful because upon completion of the first loop the eof bit remains set.
Forum: C++ Aug 25th, 2009
Replies: 4
Views: 287
Posted By jencas
Move this


int sum1 = numX - numZ;
int sum2 = numX - numY + numZ;
int sum3 = numX + numY;

int sum4 = numX + numY + numZ;
int sum5 = numX;
int sum6 = numX - numY...
Forum: C++ Aug 21st, 2009
Replies: 6
Views: 692
Posted By jencas
Then mark this thread as solved, please
Forum: C++ Aug 21st, 2009
Replies: 6
Views: 692
Posted By jencas
If the COM1 port is in use by an other process, this resource is locked by the OS and subsequent tries to open the COM1 port will fail.
Forum: C++ Jul 23rd, 2009
Replies: 13
Solved: dayOfYear
Views: 542
Posted By jencas
This code works (cut 'n paste it and try it on www.codepad.org):


#include <iostream>

using namespace std;

int dayNumber(int year, int month, int day)
{
int...
Forum: C++ Jul 22nd, 2009
Replies: 4
Views: 288
Posted By jencas
Did you try to debug step by step?
Forum: C++ Jul 21st, 2009
Replies: 3
Views: 348
Posted By jencas
COrder() {::memset(this,0,sizeof(*this));}


I really hope that you know what you are doing here....
Forum: C++ Jul 20th, 2009
Replies: 7
Solved: Newbie here :D
Views: 308
Posted By jencas
... and not to forget: http://www.daniweb.com/forums/thread78223.html
Forum: C++ Jul 15th, 2009
Replies: 4
Views: 394
Posted By jencas
Why is compareId() a member of B

This does work:

#include <string>
#include <list>

using namespace std;

struct A
Forum: C++ Jul 14th, 2009
Replies: 15
Views: 746
Posted By jencas
Your OnSim should look like:


void YourFirstDialog::OnSim()
{
CSimConFig dlg;
dlg.DoModal();
}
Forum: C++ Jul 14th, 2009
Replies: 8
Views: 341
Posted By jencas
..but without the () behind flush!
Forum: C++ Jul 14th, 2009
Replies: 6
Views: 295
Posted By jencas
Warning! This line


surname=aSurname;


just copies the pointer not the content!!!
Forum: C++ Jul 14th, 2009
Replies: 3
Views: 292
Posted By jencas
OMG, can't even believe that so many people are unable to search the internet....

google("CScrollView show bitmap");
select2nd("topic");
Forum: C++ Jul 14th, 2009
Replies: 15
Views: 746
Posted By jencas
Have a look at the MESSAGE_MAP of your main dialog (that 's what is between the BEGIN_MESSAGE_MAP and the END_MESSAGE_MAP lines). Is there a line

ON_BN_CLICKED(

followed by the IDC_... of your...
Forum: C++ Jul 14th, 2009
Replies: 2
Views: 337
Posted By jencas
I think that C++ uses the same VCL as Delphi, so look for SelectDirectory()
Forum: C++ Jul 10th, 2009
Replies: 4
Views: 490
Posted By jencas
http://www.codeproject.com/KB/cross-platform/sln2mak.aspx
Forum: C++ Jul 9th, 2009
Replies: 15
Views: 746
Posted By jencas
with VC6:
1. double click on the button in the ressource editor and provide a name for the button handler in the "add member function" window which appears or
2. right click on the button in the...
Forum: C++ Jul 9th, 2009
Replies: 15
Views: 746
Posted By jencas
Open your main dialog in Resource Editor. Double click the button and a button handler is created in your main dialog .cpp file. Place your two lines of code


CSecondDialog dlg;
dlg.DoModal();
...
Forum: C++ Jul 8th, 2009
Replies: 7
Views: 281
Posted By jencas
For (some) standard types you can get the epsilon from <limits>

see also http://www.cplusplus.com/reference/std/limits/numeric_limits/
Forum: C++ Jul 3rd, 2009
Replies: 7
Views: 416
Posted By jencas
http://msdn.microsoft.com/en-us/library/f35t8fts.aspx
Forum: C++ Jun 26th, 2009
Replies: 5
Views: 534
Posted By jencas
It's only a hint that the compiler generated code which can be executed parallely, IIRC.
Forum: C++ Jun 25th, 2009
Replies: 8
Views: 572
Posted By jencas
Rubbish! string s; calls the standard ctor for variable s, which in turn provides the correct initialization.
Forum: C++ Jun 22nd, 2009
Replies: 2
Views: 351
Posted By jencas
wchar_t means wide character. You can't convert a wchar_t to a char by "brute force casting" it. You have to call an appropriate function to convert it. Take a look at wcstombs_s(), additionally...
Forum: C++ Jun 18th, 2009
Replies: 4
Views: 268
Posted By jencas
And you should think about overloading operator << for CandyBar to allow stream output:


ostream& operator << (ostream& os, const CandyBar& bar)
{
os << bar.brandName << " " << bar.weight <<...
Forum: C++ Jun 15th, 2009
Replies: 6
Views: 897
Posted By jencas
http://developer.amd.com/cpu/CodeAnalyst/codeanalystwindows/Pages/default.aspx (works with Intel CPUs too!)
Forum: C++ Jun 15th, 2009
Replies: 8
Views: 402
Posted By jencas
After inspecting airports.cpp of your source code I recommend that you read a good C++ book. A std::vector of objects member variable doesn't need any initialization in the ctor and no destruction in...
Forum: C++ Jun 3rd, 2009
Replies: 4
Views: 251
Posted By jencas
1.
int a = ((int-1) * x; // this does not compile!!!!

2.
assert(a == -5); // Assert fails!!!!!

Does assert(b == -5); work??
Forum: C++ May 26th, 2009
Replies: 3
Solved: C++ Inputs
Views: 203
Posted By jencas
http://www.cplusplus.com/reference/string/string/substr/

1. Use sunbstr to recognize if left part of cmd1 equals "playlist"
2. If yes, separate number from cmd1 (i.e. by tokenizing)
3. pass...
Forum: C++ May 26th, 2009
Replies: 3
Solved: C++ Inputs
Views: 203
Posted By jencas
http://www.daniweb.com/forums/thread27905.html
Forum: C++ May 15th, 2009
Replies: 11
Views: 449
Posted By jencas
Correction:


struct hasName : public std::unary_function<string, bool> // allows std::not1 etc
{
hasName(std::string const &name) : m_name(name) {} // ctor

bool operator () (Foo...
Forum: C++ May 15th, 2009
Replies: 11
Views: 449
Posted By jencas
The vector contains Foos and not strings. The standard solution for this is to use a so called functor:


struct hasName : public std::unary_function<string, bool> // allows std::not1 etc
{
...
Forum: C++ May 14th, 2009
Replies: 4
Views: 309
Posted By jencas
Try 'std::stack' instead of 'stackType'
Forum: C++ May 14th, 2009
Replies: 4
Views: 309
Posted By jencas
The compiler does not know a


template <class Type>
class stackType
{
...
};
Forum: C++ May 13th, 2009
Replies: 7
Views: 1,101
Posted By jencas
Give us a little chance and tell us what GUI you are using?
Forum: C++ May 8th, 2009
Replies: 3
Views: 1,047
Posted By jencas
I marked another problem with a comment!!!
Forum: C++ Apr 28th, 2009
Replies: 2
Views: 1,140
Posted By jencas
http://msdn.microsoft.com/de-de/library/87zae4a3(VS.80).aspx
Forum: C++ Apr 16th, 2009
Replies: 7
Views: 431
Posted By jencas
Either the Client ctor lacks the initialization of order or Menu lacks an appropriate ctor
Forum: C++ Mar 31st, 2009
Replies: 2
Views: 265
Posted By jencas
frame -> Show(true);
Forum: C++ Mar 31st, 2009
Replies: 3
Views: 435
Posted By jencas
Near miss.......


template <class T>
class Tree
{
...
template <typename T> friend void buildExprTree(Tree<T> & expr);
template <typename T> friend int eval(Tree<T> & expr);
...
Forum: C++ Mar 30th, 2009
Replies: 4
Solved: linked list
Views: 425
Posted By jencas
Please show us this SortedType stuff. And btw:


while(!inFile.eof()){
inFile >> num;
intList.InsertItem(num);
}


is a potential endless loop. Try to figure out what happens if...
Showing results 1 to 40 of 81

 


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

©2003 - 2009 DaniWeb® LLC