[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Share Programming Exe thread?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 29
Thread images: 16

File: senpai.jpg (61KB, 850x400px) Image search: [Google]
senpai.jpg
61KB, 850x400px
http://www.mediafire.com/file/18ffycra1lclsos/Greentext_Mad_Lib.exe

Can I post short programs here in technology?

Share short programs thread?

Preferably if C++, i'm learning that.

The program i'm posting is based on that trendy Mad Libs type of story that sells hot-fire to kids and adults. (Yes, they had 50 shades of grey for fucking adults)
>>
File: 1491249798243.jpg (5KB, 199x250px) Image search: [Google]
1491249798243.jpg
5KB, 199x250px
>>59942728
Post source or gtfo. I ain't clickin' dat shit.
>>
File: NewbPractice.jpg (107KB, 1348x668px) Image search: [Google]
NewbPractice.jpg
107KB, 1348x668px
>>59943301

Here's some code, to tell you it's legit. You gonna post any C++ or just be a cry-baby who can't use an anti-virus to scan exe?
>>
File: 1489176231467.jpg (86KB, 548x644px) Image search: [Google]
1489176231467.jpg
86KB, 548x644px
>>59943634
> posts screenshot to prove legitness
>>
File: 1290283104880.png (4KB, 222x211px) Image search: [Google]
1290283104880.png
4KB, 222x211px
>>59942728
Sounds legit thanks for the .exe ;)
>>
File: stop.jpg (8KB, 386x318px) Image search: [Google]
stop.jpg
8KB, 386x318px
>>59943671
http://www.mediafire.com/file/xsemk44fe5catdx/GreenTextSilliness.cpp

Here ya go pussy cats.
>>
>>59943820

To be fair, you should be sharing source only, rather than distributing binaries. No one has any reason to trust a random .exe.
>>
>>59943820
Use something like hastebin.com or gist.github.com lad
>>
File: cia nigger.jpg (7KB, 195x195px) Image search: [Google]
cia nigger.jpg
7KB, 195x195px
>>59942728
>uses c++
>uses c style strings
>>
>>59943820
Mirrored: https://hastebin.com/wanopagoho.cpp
>>
>>59943925
>Overlooks the fact i'm learning C++, not
yet have developed all the functionalities, i' m still learning.

I know that's used to simulate string with arrays in C, but i'm still learning.

Why did I create this goddamn thread? I know it would end up derailling.

This serves me as experience.
>>
>>59944109
desu you repeat yourself a lot in the code. many of the phrases are repeated. you could try using something like a text string with the contents and replacing the values on the string with the input, also try loading the story from a txt file.

your indentation is kinda messy too.
>>
>>59944109

You should be grateful for criticism. If you can't stand being told that your work is shit, you shouldn't be programming, and you shouldn't be posting on 4chan for that matter. Eventually you will reach the zen moment where you realize that everything is shit, and you will not be so bothered by these sorts of comments.
>>
>>59944303
I appreciate critcism, but no one posted any programs, and that was the point of creating this thread.

>>59944244
Er, mind posting source file or screenshot to enlighten me?

You mean putting the string files in a structure?
>>
>>59942728
>Share short programs thread?
Here is a very short program: https://my.mixtape.moe/jppvaj.bat
>>
do you really need to use cout for every single sentence? java does not have this problem.
>>
File: FuckYouBatchAnon.gif (305KB, 500x350px) Image search: [Google]
FuckYouBatchAnon.gif
305KB, 500x350px
>>59944957

You don't, but otherwise it will end up being messy.

You can add a "\" at the end instead of the "
to extend towards the next line, I only used it in this case so the story can be read neatly in the command window.

>>59944848

What's your problem? I downloaded the batch file, but it did nothing visibly helpful, infact when I tried to close it, it would freeze. Not to mention windows entered some sort of compatability black version on the desktop.

Maybe it did have other function, but the batch ran horribly on my PC for unknown reasons but I doubt it.
>>
File: 1488112459586.jpg (79KB, 1280x720px) Image search: [Google]
1488112459586.jpg
79KB, 1280x720px
>>59944617
all the code inside your if blocks should be a level of indentation higher. select it and press tab

eg.
if (cond) {
code;
}


about the strings, i mean like, write a few text files like this

"Hi, I'm |NAME| and I'm |AGE| years old"

load its contents with c++ (IIRC it's on std::iostream) and replace |NAME| with the name, |AGE| with the age, etc

i wouldn't be surprised if c++ doesn't have a string replacement function though. if it doesn't, disregard this.

also, >>59944957. you don't need to cout everywhere. you know, if you do it like this:
cout << "text\n"
"next line text\n"; // this works
cout << "text\n"
<< "next line text\n"; // this works too, if you like it more
>>
cout<<">"<<idol<<" is love, "<<idol<<" is life\n";}


>;}
really nigger
>>
>>59945122
>I downloaded the batch file, but it did nothing visibly helpful, infact when I tried to close it, it would freeze.
Wow. You are either very young or RPing pretty convincingly. I'll explain.

FYI, what I posted was a famous fork bomb for Windows. https://stackoverflow.com/questions/13436408/what-is-00-and-how-does-it-work. I never thought you'd run it. I still doubt you have, but just in case, take it as a very low-cost lesson in how you should not run code from 4chan unless you fully understand it. It could have been ransomware.
>>
File: anime.jpg (85KB, 680x910px) Image search: [Google]
anime.jpg
85KB, 680x910px
>>59945141
I can see now that the indent is used to make the blocks of code look cleaner, and how you taught cout doesn't have to be used multiple times, thanks Mr.Animu Anon!

However, you lost me at strings, don't you have to declare the char with the char arrays first? Don't I need to put <cstring> header too?
>>
>>59945424
dude just read a programming book. c++ is for cucks use java instead unless ur making gaymes
>>
File: Hackerman.jpg (175KB, 1920x1079px) Image search: [Google]
Hackerman.jpg
175KB, 1920x1079px
>>59945229

I heard about term double attack, and buffer-overflows, but I never thought it could be used in an .exe.

I thought it would usually be done against servers through hacking or insecure programming.
>>
>>59945457
>I never thought it could be used in an .exe.
You should seriously read some sysadmin-type book about how Windows works.
>>
File: Frank.jpg (25KB, 480x360px) Image search: [Google]
Frank.jpg
25KB, 480x360px
>>59945435
>Gaymes

I'm only learning it to use Unreal Engine later on, you caught me.
>>
File: walter white.gif (370KB, 720x480px) Image search: [Google]
walter white.gif
370KB, 720x480px
>>59945480
Do I really?

If anything I learned today in /g/, it is to never post .exe files and only post sources, vice-versa.

I'm not gonna dedicate to learn all that jargon.
>>
File: Legend.png (177KB, 779x548px) Image search: [Google]
Legend.png
177KB, 779x548px
>>59945218
>Before I leave this thread to learn some C++
Yes.
>>
File: 1475053434588s.jpg (11KB, 250x230px) Image search: [Google]
1475053434588s.jpg
11KB, 250x230px
>>59945424
first, stop using char arrays. read up on std::string.

the idea is, have a few text files in the same folder as the program/code, name them something meaningful. as this program seems to differ its output based solely on the gender variable, it would be wise to name the files the possible values for gender.

some pseudocode for what i mean is:
string fileContents = read(gender + ".txt");
fileContents.replaceAll("|IDOL|", idol); // here idol is the variable the user inputted, and |IDOL| is what will be replaced
// repeat this for all user input variables
cout << fileContents;


And a example file, "male.female.txt" would be: "oh, |IDOL|, i love you!". with this approach every appearance of |IDOL| in the text file would be replaced by what the user inputted, and then shown on the screen.

as i said, i wouldn't be surprised if c++ doesn't have this "replaceAll" method, if it doesn't this approach would probably be harder and (maybe) longer than the one you're currently using.
>>
>>59945745
It doesn't have have the "replaceAll" method.
Writing up every variable with [ ] if it did work sounds much more complicated.

Thanks for the previous help, but this seems too convoluted for what's needed to finish the job.
Thread posts: 29
Thread images: 16


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.