« first day (177 days earlier)      last day (4769 days later) » 

1:14 PM
@ChrisBecke what about bool? ;)
 
@Model no, garbage by default, cause it's not initialized, you should set it to NULL
yes pointer to null is null pointer
 
NULL pointers are not OK either, but at least you can tell they're not OK. :P
 
@PiotrLegnica NULL pointers are fine when they are supposed to be null, else you have a problem
 
Als
1:31 PM
what happened here? Why the silence?
@Model: Hey Tina..One of the few to say pointers are easy ;)
There is no problem in that code
What is the error you are getting? You are showing two different sets of ccode
 
You are defining ptr once as int, once as int*.
 
Als
@AProgrammer: ohh...Thats correct...But then error should be redeclartion?
@Model: There is no error in the code: int j,k=2;
int *ptr= &k;
 
@jalf forgot bool.
wchar_t also
 
Als
@Model: int ptr=NULL; & int *ptr= &k; What are these?
 
and the unsigned modifier, in addition to short and long.
your first mistake is not asking the question here: stackoverflow.com/questions/ask
your second mistake is typing non trivial code into chat.stackoverflow.com, rather than typing it into ideone.com, and linking the snippit demonstrating your problem
 
Als
1:48 PM
@Model: Are u even paying attention to Chris's comments...He is telling you some very important points which will help resolve your q's more easily and make life easy for everyone
 
windows.h only exists on systems on which the windows SDK has been installed.
hence the error on trying to #include it
and the error probing the size of BYTE.
 
Als
@Model: While posting code on Ideone or codepad, You cannot include any System(read OS) includes
 
This wikipedia page has the list of standard c++ include files that will work in codepad or ideone:
The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the programming language C. The C standard library is an interface standard described by a document; it is not an actual library of software routines available for linkage to C programs. No such implementation is properly called C standard library. Note that there is also the term C library, which may refer either to an informal synonym for C standard library (e.g. "malloc is ...
 
Als
@Model: What error are you getting if you put those declarations inside main?
 
@Model what declaration?
 
Als
1:54 PM
@Model: The error is because you are using same variable name ptr for two declarations, one as int and one as int*
 
there is no error.
 
Als
Making it a redeclaration of variable name ptr
 
thats a warning.
 
@Model, you can have two variables with the same name if they are in different scope.
You can't in the same scope.
 
the warning appears when the variables are define at function scope because the compiler has noticed that you defined variables that you never use.
Which is normally not what you intend in a function.
unused variables happen more frequently at global scope, so the warning is not given in that case.
 
Als
1:57 PM
@Model: If i say ptr is of type int, then I should use it as a int, and not try to reutilize same variable name as variable of type int*, If you use a different names it will work
 
but the underlying problem still exists. defined variables that are not used.
 
Als
@Model: As Chris pointed out it is a good practice to declare only the variables that you are going to use in the program....Whats the use of declaring variables and not using them
@Model: You should probably read more about C++ from a book, because that will help you understand more and better
If you still face problems, ofcourse folks here will help you
 
@Als been trying to get that through to her on more then one occasion, to no avail :(
 
Als
@Tony: I noticed.....Alf has been tutoring her i think i saw a room
 
@Model the latter is cast to a void pointer and the first isn't
@Model so besides that, no difference
@Model what link?
 
Als
2:07 PM
@Model: seems like a quickfire round today :)
 
@Als lol yes, could be here for days at this rate :p
@Model huh???? please speak proper English, cause that makes no sense
 
Als
@Model: If you are asking a problem, you should state the problem premise clearly, give the source codes you are referring and the exact errors you are facing
 
@Model no, ASSERT is used for debugging
 
Als
@Model: ASSERT is not really used for commenting, who told you that!! :(
@Model: Why dont you refer a C++ Book, internet though a great resource, you can never say the information is authentic or definitive
In case of most books you can be sure, its correct
 
@Model buy it NOW !!! Please and save us!
 
Als
2:12 PM
@Model: Yes buy a book and soon...It will make your learning so much better and Tony's life so easier...he is never so high lol Tony
 
@FredOverflow @FredOverflow Thank you for the precision :) I really did oversimplified and this is a very enlightening post.
 
@Als hahah :)
 
Als
@Tony: About 8hrs ago, when i left here You were in a generous helping mood...and 8 hrs later I come back to see a very frightened you..Tina slayed a C++ geeek! haha
 
@Als yes I've been beaten to death with questions to which a C++ book provides answers, if you ever bother to read it
 
Als
@Model: Whats with this sizeof's? Just a while ago Chris told you to post codes in Ideone or codepad and just give links here, Tina
 
2:18 PM
@Athreya Given that this is lounge<c++> I think someone should have mentioned std::codecvt
as (presumably) the c++ way to convert between unicode and mbcs encodings.
 
why this error in this line Stack<char> s; if the constructor for this one is like this: Stack(const Stack<T>& aStack);

error:

error LNK2020: unresolved token (0A00002A) Stack_.Stack<char>.__dtor
fatal error LNK1120: 1 unresolved externals
 
@cyberrog from that we cannot determine the reason from a linker error
 
Als
@Tony: I wonder Alf's patience and grit
 
Stack<char>::~Stack(){} is defined in a cpp file you have neglected to include in your project
 
@Als yea he must be rock solid patient if you ask me
 
2:20 PM
given that its a template class, presumably someone has declared, but not defined, a template specialization of Stack<char>
 
i included the cpp file
 
@ChrisBecke Nobody wanted to have to show the 20 lines or so needed for a conversion.
 
Als
@Tony: Yes but I wonder, if that is the problem....You cant discuss things that can be found in a book..It becomes too much to discuss then
 
@AProgrammer there is that.
 
Als
@Model: No one wonder he is a real nice guy....Just if you read from books it will help you more.
 
2:23 PM
@cyberrog and by "the cpp file" you do specifically mean "the cpp file that I have verified contains the definitions of the <char> template specializations of Stack"?
 
Als
@Model: Thats good....study concepts from book and if you have doubts then ask....concepts from internet you never know if they are correct or not....see you got wrong understanding of ASSERT
 
@Model Do you share with Alf a language other than English? I sometimes wonder if that is not part of the problem we have to communicate with you.
 
Als
@Model: You should care of what you write, because someone has to understand it to help you
 
@Model that's your primary problem don't care about english on an English chat...
 
@Tony See Tony, thats your problem: interpreting statements made my non english speakers as thogh said by an english speaker.
 
Als
2:30 PM
@Model: Is the quick fire over for today? You really keep going non stop don't you? If you really invest your time wisely I think very soon you might be the one helping lot of others here :)
 
@Model so what, as a matter of interest, is your native tongue?
 
Als
@Model: If you read and understand concepts, you can complete it faster. Completing the work and not understanding concepts clearly, you will get stuck again next time the same problem comes.
 
@ChrisBecke in fact its a Stack<T> template, declared as template<class T>
 
@ChrisBecke I don't mind some errors by non english speakers, but some aren't even trying imho
 
@Tony on that point I do agree. While english speakers are notoriously tolerant of other languages there is a threshold of grammer and syntax errors beyond which we cannot reliably determine the intent of a statement.
 
2:37 PM
@ChrisBecke :)
 
@Tony I'm not sure it isn't trying. Tina seems to come from Asia and the structure of some asian language is different enough that it is difficult to map one to the other.
 
Als
@ChrisBecke: That depends and varies from person to person too...English is not my first language too
 
It isn't just lack of vocabulary or grammar, it is the way some relationships -- time between other -- are expressed.
 
she does have a curious yoda-speak aspect to her sayings...
 
@AProgrammer well, she's sure enough driven some people bonkers by talking incomprehensible jibberish
 
2:39 PM
I mean, a curious yoda-speak aspect her utterings have, yes?
2
 
@ChrisBecke hahahahahah :)
 
Als
Well atleast one things to be given credit is...the fighting spirit...:)
 
@Model yes, increase the address stored by the pointer, mostly used in low level array handling
 
so, actually pointer addition IS used to increase the address that references where an object is stored.
 
Als
@Tony: What would u suggest, C++ standard library by Josuttis or Effective STL by Scott Meyers, for starting to understand STL from basics
 
2:48 PM
Josuttis then Meyers. If you don't know the material in Josuttis, the points made by Meyers make little sense.
 
@Als Josuttis indeed, cause Meyers is probably assuming you already understand some STL basics
 
Als
@AProgrammer, Tony: Thanks! Josuttis it is then!
 
@Tony I never said I can understand her. She reminds me some Japanese co-workers we all -- included native english speakers -- have trouble to understand. And they are making more effort than her.
 
tina has the double penalty of trying to learn english, with no formal training, to communicate very technical c++ questions. Where a lot of c++ is based on subtle differences in the definition of english words: define vs declare for example.
as a result, she really should care about learning english.
 
@sbi you missed all the nutty conversations :) :p
 
Als
2:57 PM
@ChrisBecke: It also depends on the surroundings....If one doesnt have english speaking surroundings then it is going to be a problem to be able to use and learn when u cant use it
 
@Model I didn't mean that in a bad way...
 
Als
Thats an excellent example of confusion over what was intended and what was understood
 
Hey, @James? He said "repetition" of elements, not "reinterpretation" of elements. You answer was the right one.
 
Als
I just earned a Talkative badge, lol I don't know thats good or bad!
 
3:48 PM
@sbi I've got something for you, when you're around :)
 
Als
@Tony: Not sharing the goodies with us? :P
 
Doc
So the question is this: MBA or CS Master's?
 
@Als no
 
Als
@Doc: This is a C++ forum
 
Doc
@Als This is also a Lounge
I imagine all conversation is welcome. :)
 
Als
3:52 PM
C++ Lounge really...on the Q I would say depends on what u want to do
 
Doc
@Als Had I not been frequenting this chat for weeks, I would've been uncertain if such a question is appropriate. In any case, it's advice I'm looking for, not philosophy.
 
If you're going to just ask whatever you want, you have to accept whatever you get.
 
@Doc, the answer will depend on your past and your goal. We -- at least I -- know neither.
 
@JohnDibling thats true! ask tina
 
If you want people to make fun of you, get an MBA. :)
 
Als
3:57 PM
@Doc: MBA i say....without knowing about what u want or like...just bcos u want an answer
@Tony: Only if she heard it hahaha
 
Doc
There are plenty of reasons to do either
But the biggest influence has been doing some research on salary
 
Als
@Doc: Weigh them for yourselves and then decide...
 
Doc
@Als I don't really understand the hostility. The concept of advice is that it comes from others with experience...
 
Such kind of advice is better taken by people who know you.
 
@Doc Perhaps he doesn't have experience
 
Doc
4:00 PM
@Tony Which is why he shouldn't be responding...
 
(BTW, I though that MBA targeted people with an existing experience)
 
@Doc lol
 
Doc
@AProgrammer It seems like this would be a good venue for the question, given that at least some of us likely have some professional experience
 
@Doc I have no degree, so unfortunately I cannot help you
 
@Doc, your personality is probably the biggest factor to take into account here.
 
Doc
4:03 PM
@AProgrammer Yeah, I have my BS in CS and have about 5 years of professional experience. Just curious if there's a logical progression, you know?
I was kicking around the idea of my MS, even took the GRE. But I heard recently an MBA provides a lot more mobility in the professional world.
 
and taking advantage of an MBA implies at term leaving all the technical side of the job. Some crave for that, some see it as an horror.
 
Doc
@AProgrammer That's for sure
31
Q: MBA for a Computer Science guy?

jWI am a Programmer with a BS in Computer Science and I have recently been considering taking the GMAT and applying for business school. I have been in the work force for nearly 6 years and am wondering if my career path is doomed to be a programmer with highest hopes of a lead programmer in years ...

Neat.
 
Als
4:21 PM
@Doc: It's not hostility, its just that its a wrong place to ask that question
And u gave no details of your liking or preference or goal
given the limited information of premise I could'nt come up with any better answer
Now, that you have posted a Q with details it makes more sense..Perhpas my answer would be different if was asked in this way
And about me responding...You actually made me respond, giving me the curt reply of not taking philosophical answers...
 
sbi
And now a pattern that you, @Tony, already know: the grumpy old man comes back to the chat, reads up on what happened while he was a way, and dumpy all his answers...
2 hours ago, by Als
@Tony: About 8hrs ago, when i left here You were in a generous helping mood...and 8 hrs later I come back to see a very frightened you..Tina slayed a C++ geeek! haha
6 hours ago, by sbi
@Tony It's a very common pattern with Tina. She comes here and asks for help, people like you are in a helpful mood and try to, but soon become annoyed at her inability or refusal to state a proper question, context and all, to type understandable sentences, and her unwillingness the study tutorial etc. she's been referred to.
@Als I think it's mainly a case of him having seemingly unlimited amounts of time at his disposal. Still, it likely takes more patience than I'd ever have, no matter how much time I had to spare.
@Model Alf a "boy"?! The guy's older than I am, and I'm the Grumpy Old Man!
2 hours ago, by Als
@Model: You should care of what you write, because someone has to understand it to help you
@Als That's true for natural languages as well as for programming.
 
Als
@sbi: Has an eye on everything :)
 
sbi
You can't be a good programmer without struggling to find the best, most concise, and easiest to understand way to express a concept.
2
@ChrisBecke Actually, AFAICS, all Yoda ever does is to put the object before the subject and verb, whereas English always requires subject, object, verb. (We had this the other day, but I can't be bothered to go searching for it. If you're interested, though, ask and I might search for it.)
@Tony Why would I ever miss a nutty conversation? (I have a herd of kids, you know, so I have nutty conversations all the time.)
42 mins ago, by Tony
@sbi I've got something for you, when you're around :)
@Tony Then I'd better ask what it is, no, or everybody else will explode out of sheer curiosity?
@Als Will you please shut up while I'm dumping my wisdom into this chat? :)
(Done now, as you were.)
 
Als
@sbi: Looks like you are in a talky mood "grumpy old guy" :)
 
Xeo
@sbi I think it was S-V-O ? subject,verb,object?
 
sbi
4:33 PM
@Xeo Oh, dammit! You're right, of course. Sorry for that brainfart, @Chris.
 
Als
@sbi: if i can say this....though Tina's questions are basic laced with bad language and usually she is adamant i do admire her efforts...though its a different case of not being put in right way
 
cpx
@sbi I think she tries to be funny sometimes while knowing it all.
 
Als
@cpx: I am not sure because I have worked with some japense developers and english grammer is last thing they know..I have seen people translate native languages to english using language convertors and dump them in to mails with no sense of what it means...bottomline is they have very less exposure to englisj
 
cpx
@Als Are you sure that she's japanese?
 
Als
@cpx: I think she is from Korea....I quoted Japenese as an example...No offence really..
 
Xeo
4:43 PM
@Als From a german perspective, english is a pretty easy language. both are germanic languages, while learning spanish, italian or french is a lot harder because they're latin languages. the same holds true for chinese, japanese, vietnamese, korean and all other asian languages. the main differences are just between the base of all the languages
So I can hardly blame anyone from a non-germanic-land trying to speak a germanic language, as long as they at least really try it. and tina (or model now it seems) just doesn't seem to try
 
Als
@Xeo: The problem is usage....Why would one learn English if all their day to day work is carried out in Japenese or say korean, With practically no use of English the japs or chinese or koreans seem to not catch it up or be well versed in it
 
Doc
@Als This is a C++ forum. ;)
 
Als
English is not a first language for me too, but for me all the work culture and medium of communication is english and i that is the reason i can use it comfortably(atleast i am understandable)
@Doc: We are talking about something we all relate to in here....
 
Xeo
@Als what did you say? :)
 
Als
haha Xeo
 
Xeo
4:48 PM
actually, that's a valid question, in hindsight. i can only read what you write, not hear what you say. but that would be nitpicking
 
Als
@Xeo: Maybe you wont understand what i say(accents) but atleast you will understand what i write.
 
Xeo
@Als that holds true for bavarians too, even though they claim to speak the same language as I do.
 
Als
Hi Model, Hi Tony :)
@Model: Where are u geographically located?
 
@sbi I have an invite for SO Careers for you :)
you need to send me an email to tony_stackoverflow at yahoo dot com, cause I can only invite by email...
@Model no I am not
 
5:14 PM
hi! can anybody help me a bit in c++?
i have a generic list which stores data, and it has an attribute on destruct, that does the datas needed to `delete` or not. My problem is that if i not store pointers in that, the complier throws an error that non pointers cannot be deleted. But i dont want to delete because the if not let this.
shall i ask this on the OS or this is a trivial question.
 
Als
@omnosis: Its best to ask it as a question because it gets a wider audience and better possibility of getting you a answer soon
 
ok
 
Als
@Omnosis: What is the generic list that you are using?
 
As we were writing about learning a new language: voxy.com/blog/2011/03/hardest-languages-infographic/…
 
5:26 PM
@BlackBear Not really. Try Malbolge.
 
Gotta love this one : lolcode.com
 
@PiotrLegnica WTF? mr Olmstead had a lot of free time I guess ;)
 
@Als i am writing my own
 
@Model which line?
 
because this is my homework project
 
5:32 PM
@BlackBear Or Whitespace. There are a lot of harder languages than Brainfuck. :P
 
it's not really important. They just mean that the dereference can be optimized away because the array is a constant, so it has a fixed address known at compile-time
 
0
Q: c++ generic list deleting non pointers

omnosisi have a generic list with a template template<class t> class GenericList { //the data is storeed in a chained list, this is not really important. struct c_list {t data;c_list* next; ...constructor...} public: bool isDelete; GenericList():isDelete(false) {...} void add(t d) { c_list...

 
and on that line, it just stores the address of the array into ptr, so it doesn't need to examine what's actually stored in the array
 
@omnosis The big question is, why are you writing your own list.
 
@PiotrLegnica because this is my homework
and i want to know how are the yworking (also)
 
5:54 PM
hi
 
sup
 

« first day (177 days earlier)      last day (4769 days later) »