« first day    last day (62 days later) » 

00:02
I'm trying to get a BIG glittery neopenis gif
@Cicada good for you...
 
1 hour later…
01:14
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?
01:20
;_;
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...
01:23
@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.
01:24
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
01:25
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.
01:29
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.
01:33
@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?
01:36
pornguy7
56 messages moved from Lounge<C++>
5 messages moved from Lounge<C++>
poof
@robbert229 you there?
01:51
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?
01:58
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?
02:02
okay
hwo do I write output / log to a file?
thanks
02:21
@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
02:27
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.
...
02:27
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.
03:27
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);
03:44
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 :)
03:56
Thats fine.
see you!
See ya!
 
2 hours later…
06:07
This is C++?
06:44
@Washu yes this(C++) is c++ :P
 
7 hours later…
13:28
This room needs more templates.
Templates.
14:12
@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…
19:07
@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.
19:18
@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.
19:51
@robbert229 RGB != hex
2
@robbert229 you ever used openssl?
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…
22:50
hi
how do I C++
I tried g++ main.java && ./a.out but it doesnt work
help
What?

« first day    last day (62 days later) »