11-11-2011
to make a vector of int, do vector<int>
to make a vector of test, do vector<test>
to make a vector of slartibartfast, do vector<slartibartfast>
10 More Discussions You Might Find Interesting
1. Programming
Another C++ question, please do notify me if this forum is C-only!
:)
I'm having a vector...
vector<Person> x;
... with a class I've defined (Person).
I have several elements in this vector and I would like to save it to a file (binary (?)). And later on open up this file to retrieve... (1 Reply)
Discussion started by: J.P
1 Replies
2. Programming
using SUN C++ I have a problem when I do a push_back on a vector. The linker gives me a undefined symbol error on __cxa_end_catch.
Any ideas, is there a library to include?
Thanks
Chris (1 Reply)
Discussion started by: CDurkin
1 Replies
3. Programming
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
Discussion started by: dhanamurthy
1 Replies
4. Programming
Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (0 Replies)
Discussion started by: carl.alv
0 Replies
5. Programming
Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (1 Reply)
Discussion started by: carl.alv
1 Replies
6. Programming
I modified some code I found on Wikipedia concerning maps to see if it would work before applying it to a project I'm working on that has a similar idea.
What I would want is for a user to be able to enter sentences and then be able to distinguish how many times a the person entered a word in a... (4 Replies)
Discussion started by: kcgb20
4 Replies
7. Programming
I've been struggling with this for quite some time. I decided I should get some help with this. Nothing is working. I'm getting a segmentation fault or out of bounds error when I try to load the entries in the for loop.I'm really frustrated. :mad: Compiling isn't the problem. It's crapping out on... (5 Replies)
Discussion started by: sepoto
5 Replies
8. Programming
Hi all,
I have a vector,the type of the element within it is list<int>,and i wanna sort this vector.So i implemented a function as a predicate for sort(the STL algorithm).Problem came when i missed the bold part in my code,g++ generated lots of error messages.And after i added the bold... (4 Replies)
Discussion started by: homeboy
4 Replies
9. Programming
hello guys.
i'm new to c++. i've problem using two dimensional vector.
i've a project of making conway's game of life. this is the code that i have made so far.
my problem is how can i give a two dimensional vector through main.
glider.vec1 = vec; is not correct way to give a two... (2 Replies)
Discussion started by: nishrestha
2 Replies
10. Shell Programming and Scripting
In AWK
For 3 individual vectors of the form:
-2.772 -9.341 -2.857
-5.140 -6.597 -1.823
-2.730 -5.615 1.159
I would like to write a script that parses line by line to (i) normalise, (ii) divide by the norm for *each* vector.
I.e.
sqrt(-2.772^2 + -9.341^2 + -2.857^2)=10.154
... (4 Replies)
Discussion started by: chrisjorg
4 Replies
LEARN ABOUT SUNOS
mlib_vectorang_s8c
mlib_VectorAng_U8C(3MLIB) mediaLib Library Functions mlib_VectorAng_U8C(3MLIB)
NAME
mlib_VectorAng_U8C, mlib_VectorAng_S8C, mlib_VectorAng_S16C, mlib_VectorAng_S32C - vector complex phase (angle)
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_VectorAng_U8C(mlib_d64 *a, const mlib_u8 *x, mlib_s32 n);
mlib_status mlib_VectorAng_S8C(mlib_d64 *a, const mlib_s8 *x, mlib_s32 n);
mlib_status mlib_VectorAng_S16C(mlib_d64 *a, const mlib_s16 *x, mlib_s32 n);
mlib_status mlib_VectorAng_S32C(mlib_d64 *a, const mlib_s32 *x, mlib_s32 n);
DESCRIPTION
Each of these functions computes the phase vector of a complex vector.
The following equation is used:
a[i] = atan(x[2*i + 1] / x[2*i])
where i = 0, 1, ..., (n - 1).
PARAMETERS
Each of the functions takes the following arguments:
a Pointer to the destination phase vector.
x Pointer to the source vector
n Number of elements in the vector.
RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
SunOS 5.10 10 Nov 2004 mlib_VectorAng_U8C(3MLIB)