- Joined
- Nov 12, 2009
- Messages
- 76,913
- Reaction score
- 17,499
who the fuck wades through a cottonmouth and gater infested swamp to nail "REPENT" on a tree for people fleeing their shithole towns?
People like that
who the fuck wades through a cottonmouth and gater infested swamp to nail "REPENT" on a tree for people fleeing their shithole towns?
Yeah, I noticed that. I'm sure that warning is an issue with the function doing something that is deprecated in c++ and there is nothing you can really do about it.@sickc0d3r
I just read through some of the comments of the video you suggested and many of the commenters (who apparently followed instructions correctly) are getting the same program crash as I am. Also interesting to note is that all of the various example C graphics programs that I have tried ( including the one your showed me) seem to build fine except for the warnings. But they always crash in the execution.
Also the guy in the video is using Win7. I am using Win10
Yeah, I noticed that. I'm sure that warning is an issue with the function doing something that is deprecated in c++ and there is nothing you can really do about it.
I'm at work and can't see the image in your previous post. What compiler are you using? I run windows 10 also, and my curiosity is piqued, so maybe I'll try to get it to work when I get home later and let you know what I did. That bgi is a DOS graphics programming interface, so it sounds like it is pretty old, lol.
Has that idiot ever been to Minneapolis and seen the Somalian immigrant population?Chris Rock at his best is as good as anyone.
Black people are 10% of the fuckin' population. Black people are New York, D.C., L.A., Chicago, Atlanta. Like 10 places. Okay? Ain't no black people in Minnesota! The only black people in Minnesota is Prince (RIP) and Kirby Puckett. Shit the whole rest of the country, the other 40 states is filled up with broke ass white people. Broke ass. Livin' in the trailer home. Eatin' mayonnaise sandwiches. Fuckin' they sister. Listening to John Cougar Mellencamp records!
Has that idiot ever been to Minneapolis and seen the Somalian immigrant population?
This school shooter is ready to plead guilty if they take the death penalty off the table. Fuckin coward. For some reason I respect guys who are just like, "fuckin kill me".
@Trotsky Marx and Che had some of the best last words. Don't know if they are true but I always liked them. I showed somebody Che's last words and she said it sounded humble. It is. You are only killing a man. Happens everyday. Get on with it.
This school shooter is ready to plead guilty if they take the death penalty off the table. Fuckin coward. For some reason I respect guys who are just like, "fuckin kill me".
@Trotsky Marx and Che had some of the best last words. Don't know if they are true but I always liked them. I showed somebody Che's last words and she said it sounded humble. It is. You are only killing a man. Happens everyday. Get on with it.
Yes, Che is a saint and true man of principle. Like Lenin (a far less pure and less admirable man), it is truly sad that the propagandizing of his legacy so starkly betrayed what he stood for.
I was just thinking recently about the great last words of some person that I respected, but I cannot recall who it was. I'll check back with that.
Do you have another device you can try? What anti-virus are you using? I'd check the browser scanning options (in your antivirus) and also try using another DNS.
By the way I got the C graphics to work in Code Blocks, just uninstalled CBs and MinGW and reinstalled but this time using Code Blocks setup including MinGW. Last time I installed a MinGW independent of Codeblocks. Now everything works.
About the twitter images block. Here is a screenshot of an error message I am getting when I try to view the image in a separate window. Notice the line: Subject: *cloudfront.net. I looked up cloudfront and found this regarding it. Do you make anything of this? Remember 'pbs.twimg.com' is Twitter's in-house image hosting site.
"Cloudfront.net is a legitimate and safe content delivery network owned by Amazon, however cyber criminals are abusing this CDN to deliver malicious content.
This CloudFront.net redirect is usually caused by adware installed on your computer. These adware programs are bundled with other free software that you download off of the Internet. Unfortunately, some free downloads do not adequately disclose that other software will also be installed and you may find that you have installed adware without your knowledge."
Anyway here is the error message:
@sickc0d3r
here is something you might know the reason behind (I don't yet)
when I run this the first COUT gives same number each time (3). Now, all successive COUT lines give different random #s when rerunning. Even if I delete the first COUT line I get the same result.
And even when I use: uniform_real_distribution<float> it is the same result. The first print output always begins with .45 . The rest of the COUTs appear to be random but the first float output between 0.0 and 1.0 always begins with 0.45 _ _ _ _ _ etc.
--------------------------------------------------------
#include <iostream>
#include <string>
#include <random>
#include <ctime>
using namespace std;
int main()
{
default_random_engine randomGenerator(time(0));
uniform_int_distribution<int> diceRoll(1,6);
cout << "I am rolling a " << diceRoll(randomGenerator) << endl; // Always prints out '3'
cout << "I am rolling a " << diceRoll(randomGenerator) << endl; // This one on down prints different random #s each time so they work properly.
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
return 0;
}
----------------------------------------------------------
Try turning it off and turning it back on again.
But what about the mention of 'cloudfront' in the error message. Why would that show up there?
@sickc0d3r
I uninstalled my whole Code Blocks and MinGW setup and reinstalled. Last time I installed Code Blocks I forgot to include MinGW in the setup so I had to install MinGW separately and the instructions I used might have included something that was not standard, some conflicting crap or other.
Anyway I reinstalled Code Blocks this time choosing 'codeblocks-17.12mingw-setup.exe' rather than just 'codeblocks-17.12-setup.exe' so I didn't have to install MinGW separately.
The instructions for getting Code Blocks to run C graphics (as you already noted) are simply:
--add 'graphics.h' and 'winbgim.h' to 'include' folder in MinGW
--add 'libbgi.a' to 'lib' folder in MinGW
--link 'libbgi.a' in Code Blocks Linker
--add these entries to "other linker options": bgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
Here is a vid I made of me running a bouncing ball I got from some random C graphics website
[[EDIT]] I almost forgot my original intent. I wanted to try to understand the basic C code for the movement of something like the ball. But what I will probably do is just learn C++ a little bit longer then start messing with some basic C++ graphics, then maybe come back to C to try to understand what guys like Carmack were doing in the 90s. Mainly just for the fun of it. That is just a fascinating time in computer history.
That "random generator" kind of sucks and this is a known issue. I think you can use a better seed than time() to get around it, like this example I found:@sickc0d3r
here is something you might know the reason behind (I don't yet)
when I run this the first COUT gives same number each time (3). Now, all successive COUT lines give different random #s when rerunning. Even if I delete the first COUT line I get the same result.
And even when I use: uniform_real_distribution<float> it is the same result. The first print output always begins with .45 . The rest of the COUTs appear to be random but the first float output between 0.0 and 1.0 always begins with 0.45 _ _ _ _ _ etc.
--------------------------------------------------------
#include <iostream>
#include <string>
#include <random>
#include <ctime>
using namespace std;
int main()
{
default_random_engine randomGenerator(time(0));
uniform_int_distribution<int> diceRoll(1,6);
cout << "I am rolling a " << diceRoll(randomGenerator) << endl; // Always prints out '3'
cout << "I am rolling a " << diceRoll(randomGenerator) << endl; // This one on down prints different random #s each time so they work properly.
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
cout << "I am rolling a " << diceRoll(randomGenerator) << endl;
return 0;
}
----------------------------------------------------------
If you really want to work with graphics while learning c++ I'd suggest you grab something like cinder or sfml. Plenty of documentation and they are from this century so they run on opengl.