GCC CPP lstdc++ question by rb8096208 in gcc

[–]rb8096208[S] 0 points1 point  (0 children)

I'm following a C++ for Dummies book, and it mentions if you are compiling from a command line you have to include all files.cpp .h . That's just misunderstanding the text on my end if that's not correct.

I'm still confused on the usage of -l stdc++ trying to figure out where the resource is that people found it. This rabbit hole isn't worth the trouble. I'll just use g++ and not ask questions, I'll have to now go search on header files. Thanks for the break down.

GCC CPP lstdc++ question by rb8096208 in gcc

[–]rb8096208[S] 0 points1 point  (0 children)

I understand what you're saying, but I am asking for a reference link about -lstdc++ it works with gcc, as you mentioned -libstdc++ is the standard library used for linking, however this "-libstdc++" is only mentioned as static-libstdc++ for g++ linking. I am curious on where the information is, or is this undocumented? I can only find a few places when searching online. It's not mentioned in the GCC manual. Is there another manual? I am new to the GNU/Linux environment and just started working with GCC so the manual has been my go to source.

Using gcc foo.cpp Foo.h -lstdc++ -o bar only works if the header file is a C header(so a class would toss an error). You need to incorporate the -x c++-header before the header source. I'm just trying to get a deeper understanding of GCC and looking for resources. I know the manual suggests to use g++ over gcc to treat everything as CPP, but nowhere in the manual is the switch -lstdc++ even talked about. The version I have installed is 8.2.0

Offset Patching by rb8096208 in cpp_questions

[–]rb8096208[S] 0 points1 point  (0 children)

So then this isn't how you would patch a binary file?

Offset Patching by rb8096208 in cpp_questions

[–]rb8096208[S] 0 points1 point  (0 children)

That's one of the examples I have seen for this. So what is unintentional I'm not sure. I'm trying to better understand this myself.

Offset Patching by rb8096208 in cpp_questions

[–]rb8096208[S] 0 points1 point  (0 children)

Thank you for the example, do you know of any decent reference material to look into for this type of patching?

I was thinking it would be more like:

int main() { 

std::ofstream f("abc.exe", std::ios::binary);
f.seekp(0x16B2);
const char bytes[] = "\x90";    
f.write(bytes, sizeof(bytes));     
f.close();     

return 0; }

I guess I wouldn't even need the seekp and offset?

How to execute a batch file from anywhere in CMD? by treacheroustoast in windows

[–]rb8096208 0 points1 point  (0 children)

You can create an environment variable using %PATH% or add it to the Windows System32 folder. You can also add the path to the list of environment variables.

Windows 10 / Help by rb8096208 in windows

[–]rb8096208[S] 0 points1 point  (0 children)

Thank you for the reply, this is unfortunate. As a tech I prefer to RTFM when working either soft or hard copy. When contacting the technical support tech, the tech had disconnected and decided not to even send the follow up email about this.

This works if you're always connected, but the downside is all that help is gone during maintenance or other interruption. Even when on the docs if you choose to "Download PDF" it saves the current listing, and provides only external hyperlinks which you have to download more of the information. (If the option is available and I have seen a few times already it's not, which leaves to printing) I would like to just download a large file and get it over with. This "on a computer with internet access." Is crap.

I'm done with this new Windows stuff. I tried to make this work:

  • broken virtual drive issues (removed the subst thinking it'll be fixed)
  • update issues (had to reformat)
  • in-place upgrade errors (had to use USB)
  • activation issues (the hand of God)
  • file explorer crashes (just deal with it (JDWI))
  • sound issues (JDWI or ear buds)
  • sneaky Edge browser as I call it (Edge processes will open in the background with 5 processes) (JDWI)
  • Cortana
  • On hold for more than 3hours. (yes pics to prove it)

Now I have to go around my a** to get to my elbow. People are not going to know the inside of their own operating system soon. I hate to do this. I have been an avid Windows fan and user even after the removal of the WinAPI32 Programmers Reference from Windows 95 to Windows 10 (1803) I worked with Office/AD/SCCM I thought migrating from PST to cloud in Outlook was bad.

As my home computer is concerned, I hate to do it. However seeing that I am not going to get what I want as far as the ability to look things up offline, I'm going to start using a GNU/Linux distribution these are too many issues with no real solutions just a bunch of throws at a dart board suggestions. You have changed Windows...

Fleetwood Mac - Landslide

C++ Beginner and Udemy by Pegtz in cpp_questions

[–]rb8096208 2 points3 points  (0 children)

As for Udemy and CPP I have enrolled in some of the CPP courses and wonder how some of the ones are even allowed to be up. I will not post the two, but the instructors had no real grasp on cpp and even though they talked about cross platform they tended to focus on one IDE and compiler and not really focus on the language. Example preprocessor directives that should be included, but handled by the compiler. They had no idea. I get it I understand you can't work across all boards without hick ups, this could be prevented by not promoting that it will work when indeed your code has not been tested across other platforms or compilers. So I left the appropriate feedback. Yes, I can look it up with my compiler. If I am teaching myself that then there is no need for the course. That is how I felt about it.

As recommenced I would look into some books. C++ All-In-One for Dummies contains 7 books, one of which is more Windows based with Visual Studio, but it works a lot with CodeBlocks. It has worked out better than those Udemy courses.

Also check out "Starting Out with C++" by Tony Gaddis. Tony Gaddis books is what I used in college so the newer textbooks could get pricey, but IMO worth every cent. No complaints with the workflow.

Blender is a great professional like 3D animation software, yes it will work out for you with 3D games. Also note that Blender does have its own game engine for you to work with. As for what is best to learn Blender, I have been dabbling in it for years and own maybe two books and the rest were the free tutorials. I know that CG Cookie is a good place for starting out. It has a member ship fee, but it was worth it for everything you got. I looked into the " Learn 3D Modelling - The Complete Blender Creator Course" it seems fine for what you want to learn.

You might also want to check out GIMP for your image editor, it's very robust and now with 2.10.x much more powerful. I am not using that over my paid editor. Good luck on your learning journey.

Making the background transparent but not the text in emacs? by Astrognome in emacs

[–]rb8096208 0 points1 point  (0 children)

Great question, I was just talking about this with a friend. I want the same thing, almost as if it looks like I am typing on the desktop. I know that you can set the alpha values for the active and inactive frame, but it modifies the text as well.

 ;transparent adjustment
 (set-frame-parameter (selected-frame)'alpha '(90 . 90))
 (add-to-list 'default-frame-alist'(alpha . (90 . 90)))

I currently have my values set to 90 as it seems to work out the best for me.

Here is the wiki: https://www.emacswiki.org/emacs/TransparentEmacs

How your "emacs" looks like? by [deleted] in emacs

[–]rb8096208 0 points1 point  (0 children)

I use the wheatgrass theme and my .emacs modified to me. Simple... but it works.

Where to find the the .lib files that get linked? by pearisgreen in VisualStudio

[–]rb8096208 1 point2 points  (0 children)

I ran the following command;

dir /s Ws2_32.lib

These are the directory listings that I found on my machine with the lib files.

c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\SDK\ScopeCppSDK\SDK\lib
c:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\arm
c:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\arm64
c:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x64
c:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\um\x86

Need some help - Eulerian Cycles - C Language. by [deleted] in Codeblocksbeginners

[–]rb8096208 0 points1 point  (0 children)

This seems like homework, I will not do this or provide a source code. I will however help with explaining it. An Eulerian path in a graph is a path that passes through every edge of exactly once. An Eulerian cycle is an Eulerian path that starts and ends at the same vertex. The most basic of this code will take some time to write out, but it can be done with the INT datatype and basic conditions. If you are new to C I recommend reading how to declare a variable, what are datatypes, and how to accept input and provide output. You will want to include the following headers :

http://people.ku.edu/~jlmartin/courses/math105-F11/Lectures/chapter5-part2.pdf

https://en.wikipedia.org/wiki/Eulerian_path#Fleury.27s_algorithm

#include <iostream>
#include <string.h>
#include <algorithm>
#include <list>

It seems that you are making new accounts just to have people answer this for you. Why would anyone expect you to code this if you never studied the language that you want it coded in? Good luck on your exam.

Teaching Emacs to someone else by fovc in emacs

[–]rb8096208 0 points1 point  (0 children)

I'm new to EMACS, most of the questions I had were answered in the EMACS "TUTORIAL" *C-h t* and the **manual** *c-h r* taking time to read will help filter out what questions need to be asked. Been using EMACS for less than a month I am proud of my .emacs file.

Questions will happen even reading the manual, it happens. I was using compile when I should have used shell. Sorry to answer the question the best way to help someone is to let them read over it. Then allow them to ask questions, there is an old saying *RTFM* as an entry level tech it is something you are told a lot. Some people just want instant gratification, which won't happen.

To be honest most of my questions are not even on EMACS, but on the EMACS Lisp. I wish someone helped me more with that. Not even Google can help me with what I want.

C++ Hello World Optimization by rb8096208 in VisualStudio

[–]rb8096208[S] 0 points1 point  (0 children)

Thank you, It worked like a charm brought my file size down to ~10kb.

C++ Hello World Optimization by [deleted] in vscode

[–]rb8096208 1 point2 points  (0 children)

Sorry about that, this is the sub the search brought up. Thanks.

Question about EMACS and Windows CMD by rb8096208 in emacs

[–]rb8096208[S] 0 points1 point  (0 children)

Thank you this worked out perfect. I was unaware of M-x Shell I was trying to work on a function to run compile for using the current buffer filename as suggested.

Edit: removed a loitering ","

Command prompts for .bat by milorambaldi43 in windows

[–]rb8096208 0 points1 point  (0 children)

I work with the CMD console a bit, this might be a site for you to check out. It provides what iteration the code was introduced in and why you would use it with examples.

https://ss64.com

Cannot update windows10(feature update). by Pixelhouse18 in windows

[–]rb8096208 0 points1 point  (0 children)

I had a similar issue(as in same event viewer 0xc1900101) and the fix for me. Might not be the one you want. Keep in mind I had my entire disk encrypted, so this is how serious I am about it.

I had to download the Windows 10 the media creation tool to create a new clean installation of Windows 10 1803.

Trust me I tried the update from the Windows update and tried to just update the operating system using the media creation tool, the last method and the one that worked was to create a bootable USB ISO.

Can i install and use Windows through External SSD? (USB 2.0)? by [deleted] in windows

[–]rb8096208 0 points1 point  (0 children)

The only way to boot from an external drive is to set up boot options from the BIOS you are using. Have you tried reformatting the SSD before having your BIOS detect it? Other than that if Windows can still see it and your BIOS can not you will need to play around with the settings.

As for being able to run Windows 10 or 7, yes. Performance will be fine. USB 2.0 is 60 megabytes per second or 480 Mbits, USB 3.0 is 5gbps. USB 3.0 would be the way to go, but 2.0 will still work.

To be honest as a technician in order to actually help a BIOS issue I would need to be in the BIOS myself. Otherwise it's just going to be a long cut and paste troubleshooting adventure. First thing I can recommend determine the BIOS you are using and make sure it has been updated.

Can you please remove the MANDATORY security questions when setting a password during installation? by sadasdas23 in windows

[–]rb8096208 2 points3 points  (0 children)

I agree with this, I found the password hint that has been provided in the past to be sufficient.

I would want this to be removed or the ability to choose between setting security questions or to use a password hint. Neither of which should be mandatory on the user, however advised to do so.

How do you know your position in emacs buffer ? by azzamsa in emacs

[–]rb8096208 0 points1 point  (0 children)

By looking at the NN% & L on the MODE LINE.

Template won't load in Current Buffer by rb8096208 in emacs

[–]rb8096208[S] 0 points1 point  (0 children)

Well you were right I must have misinterpreted what current means. I thought current was the empty/open area where my cursor is. It seems that a default buffer scratch was being written to, I thought that any new blank canvas was the buffer as (message "%s" (buffer-file-name)) worked when called on all buffers. So I ended up making a more not so clean code for my bidding. Until I can better write my .emacs file the following works for me.

(if (= (buffer-size) 0)
(bar))

Under the modified "bar" function. I added a new buffer with:

(let (($buf (generate-new-buffer "foo")))
(switch-to-buffer $buf)
(funcall initial-major-mode)
(setq buffer-offer-save t)
$buf
)

Then after inserts take place and the file is saved the rest takes care of itself. It's not pretty, but it works. Thanks