Skip to content
Advertisement

Tag: c++

Maikefile error make: *** [prepare] Error 127

I get the following error form the Makefile: Error: What am I doing wrong? Answer your subshell command git describe –abbrev=0 –tags is executed an returns the string “v1.1.2”. Make then tries to execute it as a program. should work

An implicit try {} catch around main

In each of my main functions, I would like to catch certain classes of exceptions and convert them to exit codes. Is there a more elegant solution to this than starting and ending each main function with macros that will paste the implicit try {} catch I want? Can I somehow achieve this with the std::set_terminate functionality? Example: Answer A

C++, addresses in array [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 years ago. Improve this question I have some sort of funny question about addresses in C++. I have such code: This code works, but allocation of addresses fears me. Does

Vector Sum using AVX Inline Assembly on XeonPhi

I am new to use XeonPhi Intel co-processor. I want to write code for a simple Vector sum using AVX 512 bit instructions. I use k1om-mpss-linux-gcc as a compiler and want to write inline assembly. Here it is my code: However when I run the program, I’ve got segmentation fault from the asm part. Can somebody help me with that???

Prevent output of carriage return with readline

I’m new to the Gnu Readline library. I need to call the readline() function when the cursor is at the very last line of the console. But I need to prevent scrolling down when the Return key is pressed; so I’m looking for a way to prevent the output of the carriage return : I’m sure it’s possible, but can’t

linux read sys call doesnt get EOF

First of all sorry if my English won’t be fluent and clear. I’m working on understanding pipes and communication between processes. I have tried to implement two c programs, the one writes into a certain pipe from what he reads from the standard input and the other one waits until the pipe opens and reads from it and prints to

bash does not get root permissions with setuid program

I have the following home-grown implementation of su: To allow for proper execution, the permissions and ownership information are set accordingly: When I invoke a shell, such as /bin/sh, I am able to modify root-owned files and directories: However, /bin/bash doesn’t seem to get root permissions: Answer Shells reset the euid to the uid for security reasons. So if you

Advertisement