|
No, you didn't get it.
Using GPS is fine. You go about your way without bothering anyone. Stopping at every street corner to ask for directions, annoying pedestrians and blocking the way for other drivers, that's lame.
|
|
|
|
|
Using the latest help technology provides is sensible. That's my point.
Veni, vidi, vici.
|
|
|
|
|
Yes, that's what we've been saying all along.
Only that in this case, "the latest help technology provides" is web searching.
The problem we have is precisely the people that won't use "the latest help technology provides", and will instead hit the forums with the same basic questions, over and over.
|
|
|
|
|
Erudite_Eric wrote: Thats really simple stuff that anyone studying a programming course should e able to work out for themselves!
There is a major difference between studying a programming course and being enrolled in one.
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
|
|
|
|
|
Some of us actually enjoy the process of breaking down a problem and figuring it out, but are told that the manager doesn't care HOW we get the answer as long as we get the answer NOW!!! Solution, turn to teh interwebs, ask the question and continue to work on the answer as you await a reply.
|
|
|
|
|
Erudite_Eric wrote: in my day we didn't ask for help at the first hurdle and things were hard then, no internet, remember compiling 16 bit code for the large memory model?
16 bit code? Oh, we used to dream of having 16 bits!
And you try and tell the young people of today that ..... they won't believe you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
And we had to make those bits ourselves! Cutting them off a big block of silicon!
==============================
Nothing to say.
|
|
|
|
|
I remember reading through the multi-hundred page MS-DOS 3.3 manual, remembering the commands. I remember reading through the text files on my "teach yourself C" CD with it's Symantec C compiler, and from that made DOS based graphics interface EXE files. I remember learning HTML basics by reading the RFC after downloading them from work ( oh joy, a 2 megabit connection at work in 1998 along with 40 PPM printers ).
All the basics of opening, reading and writing to files, were as valid in C in 1995 as they are today in PHP, but I am continually surprised by the level of some developers I work with. I'm in a PHP house at the moment. They all want to make their own "frameworks", but when it comes to raw language, how to read and write to a file, error handling, bounds checking, loop control (come on now!), the young'uns today seem to have lost the basics. Ok you can build a castle on sand, but don't expect it to last the centures before it falls over. Come on guys. If you are really lost, go bug your local library and borrow somthing written by Donald Knuth along with a language reference. If you cannot solve the problem with that, *then* come here and yell for help!
I don't mind people using the internet to look things up, it's the best reference manual there is today, especially as Einstein is supposed to have said somthing like "the most important is not to know, but to know where to look", but you really have to push this one just a tad further. "Seek and ye shall find", but "understand and ye shall know". This one people tend to forget. I'll help people who help themselves
In the end though, I really get the feeling that I am the last of my species: The self taught geek who relys on his own brain. Oh well. I'll still try to make the most of it while it lasts !!!
Cheers,
Daniel
|
|
|
|
|
Thats really simple stuff that anyone studying a programming course...
Therein lies the issue. When I was in college for my later major, there were people minoring, or auditing programming courses. So they have no real vested interest in programming as a career.
My course featured a beautiful girl who sat next to me, and needed help. That was a fun class. She got help and I got... well, the experience of giving her help, and nothing else.
Still!
It beat the sausage fest' of my physics courses.
|
|
|
|
|
My class also featured a pretty girl. Nearly 45 years later, she's still sitting next to me. Mega-
|
|
|
|
|
That is awesome! Congrats!
|
|
|
|
|
I taught a Digital Logic and Microprocessors class at a local technical college for two semesters back in the mid-eighties. I usually answered a question with a series of questions that I knew the student should know the answer to. In this way I would steer their answers so they would eventually wind up answering their question themselves.
I was fired after two semesters because I wasn't being "helpful" and answering the student's questions. Does that help explain the issue?
modified 27-Apr-12 15:28pm.
|
|
|
|
|
I have created CListCtrl using Create()function. But I dont know to add Message like CLICK, DBILCLK for created control. Friends Kindly help me.
Regards,
S.Shanmugaraja
|
|
|
|
|
Every dynamically created control have an ID, so use that ID and map your event like wizzard do for normal CListCtrl control ...
|
|
|
|
|
Ok, let's do some code sample :
#define IDC_LIST 1001
CListCtrl m_List;
protected:
afx_msg void OnClickList(NMHDR* pNMHDR, LRESULT* pResult);
DECLARE_MESSAGE_MAP()
BEGIN_MESSAGE_MAP(CMyClass, CView)
ON_NOTIFY(NM_CLICK, IDC_LIST, OnClickList)
int CMyClass::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if(CView::OnCreate(lpCreateStruct) == -1)return -1;
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | CS_DBLCLKS | LVS_REPORT;
BOOL bResult = m_List.Create(dwStyle,CRect(0,0,0,0),this,IDC_LIST);
return bResult ? 0 : -1;
}
void CMyClass::OnClickList(NMHDR* pNMHDR, LRESULT* pResult)
{
*pResult = 0;
}
|
|
|
|
|
Its working good. In my case control Id is dynamic generated.
For Example:
pmyListCtrl->Create( WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT,CRect(10,10,300,200), this, ControlID);
So how can i find controlID? and how to pass this ID into message Map?
|
|
|
|
|
I don't know how you generate dynamic control ID ...
|
|
|
|
|
Simply you cannot have some random IDs for your control but you can have some range of IDs that can be used dynamically, Say from 1001(IDC_MYLIST_START) to 1101 (IDC_MYLIST_END) and use any of this IDs for you list control and make sure you did not have more than one list with the same ID in a given time. For this you have to use ON_NOTIFY_RANGE macro and your message map entry will look like,
ON_NOTIFY_RANGE(NM_CLICK, IDC_MYLIST_START, IDC_MYLIST_END, OnMyListClick)
And you message handler will be,
VOID OnMyListClick(UINT id, NMHDR * pNotifyStruct, LRESULT * result)
The variable "id" will have the list control ID which has been clicked.
Do your Duty and Don't expect the Result
|
|
|
|
|
I'm a total beginner with C++
The program is a calculator written with CodeBlocks
When I compile it CodeBlocks, everything works
but using Visual Studio and Visual Studio Command Line the code seems to be full of errors.
Can someone please assist me what is wrong in the code and how to fix it so that it is compatible with Visual Studio
___________________________________________________
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
// Program discription and Legal Information
cout << ("basic calculator to allow ") << endl;
cout << ("arithmetic operations like +, -, *, / .") << endl;
cout << ("License GPL - by Dominik Schaller - 2012 \n") << endl;
// we need two variables to store the numbers for calculation
float a; // variable a - we use "float" for precission
float b; // variable b - we use "float" for precission
// we need an arithmetic operator for the calculation (+, -, *, /)
string c_operator; // operant input variable as string
// we need a variable to store the result into memory for later console output
float c; // to store the result of arithmetic operation of a and b
// now we enter the first number and store it into memory
cout << ("Enter first number and press [ENTER] to continue\n"); // type number 1
cin >> a; // read number one into variable a
cout << endl; // cleanup
// now we type the operator into the console window as string
cout << ("type operator and press [ENTER] to continue\n"); // type the operator
cin >> c_operator; // read operator as string
cout << endl; // cleanup
// now we enter the second number and store it into memory
cout << ("Enter second number and press [ENTER] to continue\n"); // type number 2
cin >> b; // read number two into variable b
cout << endl; // cleanup
// in this case we use basic if and else staements
// but we also could have used a switch staement
if (c_operator == "+") // check to see if operator is "addition"
{
c = a+b; // if so, calculate (a+b)
}
else if (c_operator == "-") // check to see if operator is "subtraction"
{
c = a-b; // if so, calculate (a-b)
}
else if (c_operator == "*") // check to see if operator is "multiplication"
{
c = a * b; // if so, calculate (a*b)
}
else if (c_operator == "/") // check to see if operator is "division"
{
c = a/b; // if so, calculate (a/b)
}
// now we print the result out to the console screen
cout << ("result is: ") << c << endl; // finally print result on console screen
system ("pause"); // prevent console from shutting down wait...
return 0;
}
____________________________________________________
|
|
|
|
|
You do not explain what errors you get but at a guess it is on the line
string c_operator;
Try adding
#include <string>
in the preamble section of you program.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
aaaaaahh thanks
#include <string>
man.... that solved the problem
at least for compiling on the VC Command line
In Visual Studio (not Express Edition, Student Version), I get this:
2 error LINK1120:1 unresolved externals
1 error LINK2019:unresolved external symbol_WinMain@16 referenced in function__tmainCRTstartup
|
|
|
|
|
You need to change your project type in Visual Studio from "Windows application" to "Console application". The simplest way would be to create a new "Console Application" in Visual Studio and paste your source code into the main source file.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
how i can learn java online . in 20day if i will hard work on that and trully want to learn it how plz reply me
|
|
|
|
|
Asking in the java forum[^] might be a good place to start.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Get a book start learning, if you have any idea about other oop you might be able to do that, otherwise it would be hard i guess
|
|
|
|