Using both C and C++ ISO standard libraries
(Originally posted as: another strange output?)
>I just recently was educated that I should be using #include <iostream>
>instead of using #include <iostream.h> as I had been doing.
>However, even though the education cured one strange output issue, now
>with the "correct" include spec I cannot get it to show the radix base like
>it used to using the "incorrect" include spec.
>Very much appreciate info as to what I am still missing. Code below
>#include <windows.h...Is it true you cannot use the ANSI C (not C++) standard library functions in the kernel?
I have a question about the use of the ANSI C (not C++) Standard Library
in kernel code for w2k/xp/vista.
I've been told, somewhat in passing, by a good kernel developer, that
the standard library functions (strcpy, qsort, etc) cannot be used in
kernel code because "you can end up coming out of them in the wrong
state". (We were talking about something else at that moment and he was
avoiding getting into the full explanation).
So, I'm not quite sure what he meant by that - I wonder now if he was
talking about calling conventions? in the DDK, all the...The use of the C++ standard
[I'm not positive if this should go here or comp.std.c++, so I hope
you'll forgive me if you feel it is off topic here.]
I've programmed in C++ for several years now (think 5 years seriously,
and maybe 8 from when I made my hello world), and I'm debating whether
or not I should buy the C++ standard document. So I have a couple
questions about it.
1. Under what circumstances would you recommend buying it? Is it useful
for mostly just compiler/library implementers, or do you guys use it in
everyday programming? If so, how?
2. There's a published version for about 60 USD (s...How to do analog input output of PCI-6052 or 6071 using simple C/C++ language
I need to drive a dc motor and read the potentiometer using the NI PCI-6052 or PCI-6071E by programming in simple C or C++ or Borland C but not in visual C.
what should be the necessary steps?
how to access the memory registers of NI Cards using C commands?
Adding to what Christian said here is a good link that should help you as well.
<a href="http://zone.ni.com/devzone/cda/tut/p/id/5409" target="_blank">
I found this by searching for "DAQmx text based" on...What coding standard are you using for C?
What coding standard are you using for C (if any)?
Like naming variables, functions, constants, globals, locals, types etc.?
> What coding standard are you using for C (if any)?
> Like naming variables, functions, constants, globals, locals, types etc.?
> for example:
You will get as many *different* answers as respondent...UNICODE input for CGI using C
I'm trying to accept a multi-lingual string (UNICODE) in a
form and am trying to parse it. What i am getting is %XX (which is a
single byte, not 2 bytes). So, is the data getting lost? What format
is it, if it is not getting lost.
Thanx in advance,
In article <email@example.com>,
> I'm trying to accept a multi-lingual string (UNICODE) in a
>form and am trying to parse it. What i am getting is %XX (which is a
>single byte, not 2 bytes). So, is the data g...Asynchronous programming using standard C
I'm interested in asynchronous programming but am having a few problems
understanding the underlying implementation.
I assume that asynchronous programming is generally done by calling a
function (which includes a call back function pointer in its arguments)
which starts a thread and then immediately returns. Once the thread has
completed the task it then calls the call back function to return the
data to the caller.
Is this the basic idea of asynchronous programming or have I got it
Thankfully threading is now on-topic in this group thanks to C11.
...Standard Library of useful utilities in C...
I'm new to c programming, and I come to it from higher-level, object
oriented languages. I was hoping to find a standard library that
contained common structures and functions that would be used in many C
programs. As an example, I am looking for a standard implementation of
a hash table.
Does such a library exist? I checked out the GNU C Library, but it
didn't seem to have what I was looking for.
Does every C programmer implement this stuff from scratch?
comp.lang.c.moderated - moderation address: firstname.lastname@example.org -- you must
have an appropr...Redirect standard input using CORBA
Hello, i need help or some advice to do some work.
I want to make a simple example, i've a Client and a Server.
My client ask the server to run some program, and i want that the server
return the output messages of the running program.
I want to know how redirect the output stream over CORBA. For now i've
created my client and my server. My client ask the server to run a program.
The server execute the program.
To launch the program on the server side, i've inherited from ACE_Process
and i'm using a ACE_Process_Options to set the command and parameters.
Tha...Using the carry flag in standard C
Recently the discussion about the integer flags started again.
I argued again with my "_carry()" function, but
Mr Jean Marc Bourguet and Mr K. Thompson proposed
a better alternative. Thinking about it, I think that their
solution is much better than mine, since it produces less
restrictions and fits better in the existing language.
We could do something like:
int add_with_carry(int a,int b, bool *carry);
int sub_with_borrow(int a,int b,bool *borrow);
int mult_with_carry(int a,int b,bool *carry);
The advantage of this is that in machines that do not have any carry
f...Issue with Using Standard input operation
I'm calling gnuplot from a script and the data is only ready
dynamically so I have to sent it to GnuPlot with the plot "-" operator.
If I do the following from the GnuPlot command line it works..
gnuplot> plot "-" with linesp
input data ('e' ends) > 1 2
input data ('e' ends) > 5 2
input data ('e' ends) > 6 3
input data ('e' ends) > 7 4
input data ('e' ends) > e
which produces a plot lines lines and crosses on the data points (i'm
excluding and extra settings for fitting data to scre...Input/Output, C++ to IDL, using Procedures
I am using Visual C to run a program that uses IDL functions to process
data. But now I want to have C open IDL GUIs at specific times. The
problem that I am having is that all the calling of IDL from C that I
have done so far has been with functions. And all the GUI work is done
with procedures. Does anyone know of a way to call an IDL GUI from
Visual C and then return the GUI variables to C?
Sorry, this response may be a bit weak but no one else has stepped up...
Why don't you write your GUI procedures as functions? A simple wrapper
would suffice. Maybe I am missing something.
I ...Compiling standard c source using CC
Using the Forte 11 (Sun C++ 5.8) compiler on a Solaris 10 system, most
of the source files are C++; however there are a few standard c source
files mixed in; I want to compile these using standard c rules, not C+
+, so the compiler doesn't complain about C++ keywords. Is there a
compile option that will force a standard c, rather than a C++,
compile? Something similar to the GNU GCC compile option "-x c".
> Using the Forte 11 (Sun C++ 5.8) compiler on a Solaris 10 system, most
> of the source files are C++; however there are a few standard c source
> ...Rename a file using the standard C++ library?
Is there a function in the standard C++ library that serves the purpose of
renaming a file? If not, do I have to use boost or operating system specific
Jason Heyes wrote:
> Is there a function in the standard C++ library that serves the purpose of
> renaming a file? If not, do I have to use boost or operating system specific
> code? Thanks.
I guess you could have a look at rename() method declared in stdio.h.
It might be there in the non-deprecated <cstdio>.
int rename ( const char * oldname , const char * newname );
...how to block keyboard input in Linux using C
I am running a console program in linux and want to block input from the
keyboard but I do want to allow only a select few keyboard inputs for
example 'a', 'b', and 'c' allowed but other input is blocked.
I am not sure what's a good method to do this, I have read about using
select or poll but not sure if those are best or only options
Any help would be appreciated.
In article <email@example.com>,
Durango <El_Durango@yahoo.com> wrote:
> I am running a console program in linux and want to block input from the
>...use of C++ Standard Library in the game industry
A sanity check: is the C++ Standard Library (STL) used much in the
game industry? In all my years of C++, I've avoided learning or using
it. Before bothering to write a bunch of code with it, I'd like to
know if it's a common industry practice, or if it is common to avoid
it in favor of homebrew. I do know that it was only within recent
years that MSVC got its act together with a fully working, standard
STL. So maybe I'm not quite the dinosaur I think I am? When I first
learned C++ in 1993 the STL was not worth bothering with.
Brandon Van Every
In ...Using standard input feature "-"
I'm having a little trouble with the stanard input feature as I'm
sending my data/commands to gnuplot via a script. My data is generated
on the fly so I need to use the standard input feature "-". If I just
run gnuplot by itself and type and example as follows it works...
gnuplot> set offsets 0.1
gnuplot> plot "-" with linesp
input data ('e' ends) > 1 1
input data ('e' ends) > 1 5
input data ('e' ends) > 5 5
input data ('e' ends) > 5 1
input data ('e' ends) > 1 1
This draws draws as...Using C++ standard library with pthreads in Solaris 9
I was wondering if anyone would know if the standard C++ library
provided in Solaris 9 is thread safe. I cannot find any documentation
to say that it is - and I have seen problems occur that are enough to
make me think that it isn't.
I understand that the library is provided by "Rogue Wave", who in turn
seem to base their source on the "Apache C++" library. I have tried
recompiling the Apache C++ library with the "thread-safe" options
turned on, however, the resultant library "libstd.so.1" is differently
named to that in "/lib/sparcv9/&quo...C++ skills and commonly (?) used non-standard libraries.
I have a couple of years of experience with C++. I started studying
C++ syntax, then I read the B.Stroustrup's book, and eventually I went
through the N.Josuttis' book on how to program with the C++ Standard
I am not a professional programmer however I would like to gain more
knowledge of the language to get what could be considered the skills
you'd expect from a professional developer ( I also know Unix
programming and some Ix86 32-bit Assembly programming too ).
My questions are about what to do in order to get the above-mentioned
skills. I've heard of comm...fastest 2D access, use screen pixel coordinates
i'd like to use OpenGL to do some 2D graphics and i'd like
to use the fastest mode possible.
One thing that seems critical to me is drawing "sprites" or
I heard that using glDrawPixels() is NOT very fast, generating
a texture from a bitmap and then drawing that texture is much
faster as i understood it, right?
As i only want to do 2D graphics, i'd like to use screen pixel
coordinates in my program. I tried this by DISABLING GL_DEPTH_TEST
and loading Identity matrices to GL_PROJECTION and GL_MODELVIEW.
I've set glViewPort with 0, 0, width, height (of ...how to run some exe file by using standard C++ code?
I have some program in the executable form (for example notepad.exe in
windows) and I want to run it in C++ code. How to do it?
"Pawel_Iks" <firstname.lastname@example.org> wrote in message
>I have some program in the executable form (for example notepad.exe in
> windows) and I want to run it in C++ code. How to do it?
This is better asked in a windows newsgroup because the answer can be OS
specific. system is one way, but then you can also run the executable in
it's own process, which becomes windows specif...MSXML C++
Does anyone know how to load XML from a input stream
over a network. I've written the code to load XML files
into a DOM object, but i now need to write the code
so XML can be read in from a input stream buffer?
Do i have to use SAX ?
Replies much appreciated
It depends on the size of your XML message.
DOM process needs to load the entire message into memory, whereas SAX doesn't...
email@example.com (Romeel) wrote in message news:<firstname.lastname@example.org>...
> Does anyone know how to load XML from ...using ISO C interop for mixed-language input to fortran
Hello good people in c.l.f.!
I've used interop features of C/Fortran before, but this endeavor is a
little different in that this goes in the other direction from what I
have previously written, where C calls my unbelievably-effective fortran
functions. (That might be the other/other direction for others; we all
have our perspectives, usually carved by experience.)
So I would like to call a C function that will return this data, and
fortran does not know the size of the thing being passed to it. I
believe this can be achieved by allocatables, but here's the C of it:
$ cc -Wa...help regarding 2D matrix using c mex file
I am beginner and learning mex programming in C.
I am trying to read a 2D matrix and print the pythagoras squares.
Thought compiling is successful, MATALB has thrown exception.
Can someone help me please...
thanking you very much,
#define OUT plhs
#define SAMPLE double /* define the type used for data samples */
/* Function Declarations */