« first day    last day (62 days later) » 

12:02 AM
I'm trying to get a BIG glittery neopenis gif
 
@Cicada good for you...
 
 
1 hour later…
1:14 AM
Using goto right before a brace near the end of the program? Compiler error. Add `int x;
in front of it? Works fine.
Who knows why...
 
WTF are you even trying.
 
Making textual hangman. I am in three loops deep, so... well, it is just easier. I kept looking for the syntax error, apparently it was that.
Actually.. what am I doing? I could just use return. Sigh.
Both. quit: and goto quit;
Oh, after the label, yes.
Not out of reach of my understanding :D
Well, I got it to work, it is just... don't know why it works. Adding an empty statement... hm.
 
What is an empty statement...
 
Like...
 
@Pawnguy7 You do know that ';' terminates statements, right?
 
1:20 AM
;_;
 
DON GOGGLES. NOW!
 
@sehe Yes. But I have heard the term "empty statement" for a construction such as:
The FAQ said use '`' for code. It said nothing of multiline code, that I said. And... ah. I will try that.
 
@Pawnguy7 So, you mean, you had goto somelabel } without a semicolon........ ?!?!?!?
 
Only useful if you know it exists...
No. I had somelabel: - no semicolon, and compile error.
 
The newbie hints are always on the top of the starboard...
 
1:23 AM
@Pawnguy7 It's the first link in the starboard
has been forever
 
@Pawnguy7 Why would/should it have worked? Also, what on earth do you need this for
 
user1357851
@sehe why can I not talk on mumble
 
C++ has exceptions and RAII
 
Labels must have a statement.
 
1:24 AM
pornguy7
 
@R.MartinhoFernandes Why so?
 
@R.MartinhoFernandes Because...
 
@Pawnguy7 You're labeling a spot in the code... if theres is no code how can you go to it?
 
@Cicada Chess porn
 
1:25 AM
Because.
 
It was not meant to reach code.
It was meant to reach the end of a function.
From a stack of whiles above.
 
... What are you trying to achieve
 
add return;
#problemsolved
 
#hashfags
 
Already done. Didn't think of it before for whatever reason. Still, I never saw anything that said a goto needed a statement, even though it makes sense. Requiring it seems Javaish, like initializing variables.
Not to mention.
I think the use of goto is a bit exaggerated. Bad style, perhaps, but not punishable by death. It is useful for example, with deep structures.
Also, it is *Pawn. I don't want anything to do with your discussion of such odd things.
 
1:29 AM
pornguy7
 
?
 
@Pawnguy7 WUT.?! "Requiring it seems javaish, like initailizing variables (!?!?!)"
 
IMO finding goto useful is a sign that your code is bad.
 
@Pawnguy7 Deep structures are a code smell too
 
@sehe Well, Java is more restrictive than C, C++, etc. This is to promote good practice. One such event is initializing variables - if you don't before using (locals), compile error.
@sehe They are, but I don't know what else works in this situation, besides wrapping a whilein a gameloop function or something, which works I guess.
 
1:33 AM
@Pawnguy7 "I don't know" <-- is the key part
 
@Pawnguy7 Show on pastebin/any paste site?
 
I wouldn't recommend using gotos willy-nilly, but I prefer it to getting out of, for example, a five-deep logical structure rather than four different variables.
 
@Pawnguy7 five level nesting <--- theres your problem
 
you should reduce your five-deep logicality to four-deep
 
If you want me to go away, why do you keep bringing it back up? You cannot have it both ways.
how did you get an r in that?
 
1:36 AM
pornguy7
 
56 messages moved from Lounge<C++>
5 messages moved from Lounge<C++>
 
poof
@robbert229 you there?
 
yup
 
1:51 AM
What's a succedded HResult?
NOERROR?
 
I wouldn't know, i haven't really looked at the code that much but for hr to succeed rgbSerialization needs to be setup witouth error.
I really don't know, what is the context of the program?
 
HRESULT CSampleProvider::_EnumerateCredentials()
{
    //HRESULT hr = _EnumerateOneCredential(0, L"Administrator");
    //if (SUCCEEDED(hr))
    //{
    //    hr = _EnumerateOneCredential(1, L"Guest");
    //}
    return hr;
}
I want to return a sucessfull hresult
whatever it would be if one of those commented-out methods suceeded
 
hr = S_OK;
try dat
 
Looks like it works.
Thanks!
 
Is c++ ur first real-language?
 
1:58 AM
real-language?
 
As in strictly typed (C++, C, Java, C#, etc)
 
C#, Java
 
okay, You should definately get a Stroustrup book. there not exactly the easiest books, but they are really good for learning c, c++
 
link?
 
2:02 AM
okay
hwo do I write output / log to a file?
 
thanks
 
2:21 AM
@robbert229 huh
myfile.open("C:\amd\passwordlog.txt");
Error	1	error C2220: warning treated as error - no 'object' file generated
 
does the file exist?
 
well it's a compile-time error
and no
 
oh ya.. Try catch maybe? its been a while since ive done any standard file io i always use boost for multiplatforming.
 
What is the problem @CCInc?
 
    myfile.open("C:\amd\passwordlog.txt");

    Error	1	error C2220: warning treated as error - no 'object' file generated
 
2:27 AM
Is there another error after it?
 
Nope, strangely
 
That error says, I beleive, that no object file was generated because it did not compile, but not the error itself.
 
@Pawnguy7 before it, more likely
 
Oh.
There's a warning.
 
...
 
2:27 AM
What is it?
 
Duh. I didn't escape the path.
Oops.
 
Ah. That would do it. I didn't notice that... hm. Guess I have not used IO for a while.
 
me either, im getting lazy, using too much boost.
 
3:27 AM
The hell is this?
 
The hell.
 
You guys are not even official
 
BOLD TEXT IS CRUISE CONTROL FOR AWESOME
room topic changed to (Not the) <Real> C++ Room: ISO<14882:2011>. For those who want to chat C++. No wait, go to the lounge. They have a helpdesk service if YOU ARE (you're JAB) not asking about C++. [c++11] [helpdesk]
 
@robbert229 How can I do this code in reverse and READ the file?
FILE *filea;
filea = fopen("C:\\cplog.txt", "a+");

char charVar[100];
wcstombs(charVar, pwz, 100 );
fprintf(filea,"Field ID %d: \'%s\'\n", dwFieldID, charVar);

fclose(filea);
 
3:44 AM
maybe somthing like this. ifstream fin("input.txt");fin.getline(instring, 100); At least thats the way im doing it.
I use the java esque ways ^
 
fscanf?
 
wha?
I use differing types of streams, in streams, and out streams. It's more like java, which is my favorite language. If u need a refrence to fstream -> cplusplus.com/reference/fstream/fstream
@CCInc Do you use libraries alot?
 
uhh
 
as in Boost, SDL, etc
No?
 
Umm
@robbert229 thanks for the help, I gotta go now :)
 
3:56 AM
Thats fine.
 
see you!
 
See ya!
 
 
2 hours later…
6:07 AM
This is C++?
 
6:44 AM
@Washu yes this(C++) is c++ :P
 
 
7 hours later…
1:28 PM
This room needs more templates.
 
Templates.
 
2:12 PM
@BartekBanachewicz hey i'm try get pixel color but result is wrong color what it can be? `HDC hDC = ::GetDC(tempHWND);
COLORREF rgb = ::GetPixel(hDC,50,60);
int redValue = GetRValue(rgb);
int greenValue = GetGValue(rgb);
int blueValue = GetBValue(rgb);` the color is #B38300 but it returns me #074092 I'm trying get pixel color of 3D Application.
 
1 message moved from Lounge<C++>
 
@BartekBanachewicz I hope u can elucidate )
@TonyTheLion Tony maybe u know issue about my dilemma?
 
2 messages moved from Lounge<C++>
 
 
5 hours later…
7:07 PM
@Klasik You are trying to get blue to be B38300. Blue is an integer, It can not hold B, make sure your types are right.
 
7:18 PM
@robbert229 I thought letters were valid in a hex code colour
 
I cant remembr, I actually might be wrong, its been a while since Ive done any color stuff in c++, mainly been working in java. You are using windows lib right?
I believe that GetBValue returns a byte, not an int.
@CCInc GetBValue has rgb parameters, and returns a byte, not an int. that could be your issue.
 
7:51 PM
@robbert229 RGB != hex
2
@robbert229 you ever used openssl?
 
nope,
 
damn.
 
I do most of my c++ work in datastructures, and thier manipulation. When Im working on front ends I usually am working in java or c#
just did some bench marking, Eclipse is more resource intensive than Rainbow Six 3.
 
huh
 
 
3 hours later…
10:50 PM
hi
how do I C++
I tried g++ main.java && ./a.out but it doesnt work
help
 
11:24 PM
oh dear.
 
What?
 

« first day    last day (62 days later) »