Go to advanced search

by PeterO
Mon Jun 18, 2018 9:46 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

jahboater wrote:
Mon Jun 18, 2018 9:30 am
Thanks for posting that, very interesting.
If you read it all, he is not that negative.
But I saw this amusing spoof in the comments :-
http://www-users.cs.york.ac.uk/susan/joke/cpp.htm
:)
That's so ...... believable :-)

PeterO
by PeterO
Mon Jun 18, 2018 9:08 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

http://www.theregister.co.uk/2018/06/18 ... plus_plus/

"What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++
Language creator calls proposals 'insanity'"

Clearly even BS realises C++ is out of control !

PeterO
by PeterO
Sun Jun 17, 2018 7:33 pm
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 9
Views: 359

Re: glDrawElements abysmally slow

SO one obvious question is how is the memory split set up ?
PeterO
by PeterO
Sun Jun 17, 2018 5:52 am
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 9
Views: 359

Re: glDrawElements abysmally slow

triangle.c looks like old GLES 1 code so I don't think it's worth trying to diagnose anything based on that.

PeterO
by PeterO
Sat Jun 16, 2018 7:47 am
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 9
Views: 359

Re: glDrawElements abysmally slow

Without seeing some example code it is hard to diagnose your problem, Can you at least post your modified "triangle" example that shows the problem ? I have some quite complex OpenGL ES code that runs fine, but it is composed of lots of small objects that each have their own call to drawElements. Pe...
by PeterO
Wed Jun 13, 2018 4:06 pm
Forum: Raspbian
Topic: Raspbian + Pi3B+ = low voltgae warning?
Replies: 4
Views: 276

Re: Raspbian + Pi3B+ = low voltgae warning?

The 3B+ needs the latest firmware as the way the low voltage detection circuity works has changed.
PeterO
by PeterO
Wed Jun 13, 2018 9:54 am
Forum: Advanced users
Topic: Write Raspbian img to external drive partition
Replies: 5
Views: 267

Re: Write Raspbian img to external drive partition

The image file is a "whole disk" image that includes a partition table with two partitions (for boot and root filesystems). It will not work if you try and write it into an existing partition. See the instructions here : https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.m...
by PeterO
Wed Jun 13, 2018 9:04 am
Forum: Advanced users
Topic: Write Raspbian img to external drive partition
Replies: 5
Views: 267

Re: Write Raspbian img to external drive partition

The image file is a "whole disk" image that includes a partition table with two partitions (for boot and root filesystems). It will not work if you try and write it into an existing partition. See the instructions here : https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md...
by PeterO
Tue Jun 12, 2018 7:22 am
Forum: Raspbian
Topic: The usbbootgui functiion
Replies: 10
Views: 446

Re: The usbbootgui functiion

It might help if you told us what "it" is exactly !
PeterO
by PeterO
Thu Jun 07, 2018 6:12 am
Forum: C/C++
Topic: Raspberry with C++ program
Replies: 17
Views: 785

Re: Raspberry with C++ program

by PeterO
Wed Jun 06, 2018 10:22 pm
Forum: Troubleshooting
Topic: Asci codes; who knows how to get 'asci codes' so the varieties of the letters a e i o u ?
Replies: 9
Views: 266

Re: Asci codes; who knows how to get 'asci codes' so the varieties of the letters a e i o u ?

:roll: Who knows how to make varieties of the letters a e i o u, which you get in Windows with the alt in combination with numbers? Thanks in advance, Monica To get letters like é I do this.... Google for "utf8 e accute" to find the utf8 value (00E9 in this case) Press Control-Shift-u which changes...
by PeterO
Wed Jun 06, 2018 10:16 pm
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

ejolson wrote:
Wed Jun 06, 2018 7:48 pm
I think the usual distinctions are

fixed length -- determined at compile time
variable length -- determined at run time
dynamic length -- changes during run time
By that list i should have called them "variable length".

PeterO
by PeterO
Tue Jun 05, 2018 9:52 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

PeterO, I just came across an idea for dynamically growing arrays called "stretchy buffers" and thought might be an ideal fit for your problem. As I said some way back up the thread I don't want or need "Dynamic" arrays (I used the wrong word), all I wanted was a clean way to deal with arrays of un...
by PeterO
Tue Jun 05, 2018 7:46 am
Forum: Off topic discussion
Topic: All Your Code Are Belong To Us (Microsoft buys Github)
Replies: 10
Views: 931

Re: All Your Code Are Belong To Us

"Acquisition will empower developers, accelerate GitHub’s growth and advance Microsoft services with new audiences"
Not sure that much of the new audience will have any use for anything from Microsoft !
PeterO
by PeterO
Mon Jun 04, 2018 8:33 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

It doesn't need a reboot, all it needs is a logout/login. If running GUI it might only need a close and open a terminal window.

PeterO
by PeterO
Mon Jun 04, 2018 6:04 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

That is a mystery to me. Pretty sure I did not do it and by the way it's done it seems very unlike me. It includes $HOME/.local/bin for example. Well, until you understand how it is working on your own system it might be a good idea to not criticise those who do understand how it works on Raspbian....
by PeterO
Mon Jun 04, 2018 5:48 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

Heater wrote:
Mon Jun 04, 2018 5:46 pm
@OeterO
What does "which stretchy-buffers" produce ?
It says:

Code: Select all

$ which stretchy-buffers
/home/heater/bin/stretchy-buffers
As expected.
In which case how did /home/heater/bin get into the PATH ? Was it there already ?
PeterO
by PeterO
Mon Jun 04, 2018 5:07 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

PeterO, Actually you've not tried it have you ? As n67 points out above it is needed and does work ! Actually I did. With a bit of code I happened to be hacking on an Ubuntu machine. Like so: $ cd $ gcc -std=c99 -o stretchy-buffers stretchy-buffers.c $ mkdir bin $ mv stretchy-buffers bin/ $ stretch...
by PeterO
Mon Jun 04, 2018 4:43 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

n67, Why do you say logout or reboot in your suggestion? That does nothing but waste time. You suggestion will not work if your ~/bin directory is not in your PATH Really, you need to look into remedial reading. Stop being an insulting, elitist plonker. Actually you've not tried it have you ? As n6...
by PeterO
Mon Jun 04, 2018 4:42 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

Don't do that. If you want to put it anywhere put it in /usr/local/bin or make your own bin directory in your home directory and add that to your PATH. OK - now you got it. It may be that there was no mention of adding to the PATH that made me misread it ! But as I just discovered that is no longer...
by PeterO
Mon Jun 04, 2018 3:49 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

n67 wrote:
Mon Jun 04, 2018 3:43 pm
Or, ...

$ cd
$ mkdir bin
$ mv path/to/hello bin
$ logout or reboot ...

Once back up:

$ cd /any/where
$ hello
Opse, misread that....
PeterO
by PeterO
Mon Jun 04, 2018 2:40 pm
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

That's what should happen :lol: ~/Desktop/program is not a directory where bash will look for exectable files. The list of places it does look is held in a variable called PATH On this desktop machine it is this.... petero@HP173 ~ $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:...
by PeterO
Mon Jun 04, 2018 9:33 am
Forum: C/C++
Topic: having problem to compile C && C++ program on PI3
Replies: 28
Views: 867

Re: having problem to compile C && C++ program on PI3

Parth1234 wrote:
Mon Jun 04, 2018 9:19 am
I have rasbian I am not able to compile c program on Pi. Do i need to install gcc compiler. or it has inbuilt in rasbian
gcc is installed by default.
How exactly does it fail ? Any error messages ?
PeterO
by PeterO
Mon Jun 04, 2018 9:17 am
Forum: Troubleshooting
Topic: Boot from External HDD
Replies: 3
Views: 120

Re: Boot from External HDD

Hi, This has probably been answered a 100 times, but since the process keeps changing, I need help. What I've tried: 1. Downloaded the newest raspbian image from this website and extracted it so I get the .img 2. Flashed the .img onto my external hard drive using Win32DiskImager and confirmed parti...
by PeterO
Sun Jun 03, 2018 7:21 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

The example given in the original post allocated memory from the heap using malloc and is not about stack-allocated local variables. In that example, pointers to variable-length arrays are used for notational convenience so the standard notation array[x][y] works instead of the construct array[x*ys...

Go to advanced search