|
by: Yodai |
last post by:
Hi all....
I have a little problem that's driving me nuts. I can't seem to make any
sense of it. I have this small webserver that substitutes some data from a
page when finds a substitution string. I all works fine, even the sprintf,
when I write numbers. But if I want to write a character string, it all goes
wrong.
I am trying to print...
|
by: Michele |
last post by:
I have a code line like this:
sprintf(buf, "%20g",*(liftPtr++))
what does it mean? And what does the function sprintf do?
Thanks
michele
|
by: huey_jiang |
last post by:
Hi All,
I am trying to figure out a right syntax to convert an integer array
into hex array. sprintf worked for me on doing single integer:
int i, Iarray, n=15;
char buf;
sprintf(buf, "0x%02x", n);
The above code worked. Howeve, what I am trying to do is to convert an
|
by: jt |
last post by:
I need to produce 1 character array from 3 others. I tried sprintf and it
terminates on the first 0, null, 0x00 it sees in tmp data.
All 3 args print out nice by themselves.
By trying to make the character array(alerts.msg) with sprintf doesn't work
for the obvious reasons in my first sentence with tmp having those control
characters.
Is...
|
by: jimjim |
last post by:
Hello,
I was wondering about the implications of giving as an argument to sprintf a
different data type from the one specified in the format argument. This type
of question along with some others are asked below:
1. #include <stdio.h>
int main(){
char buffer;
|
|
by: aap |
last post by:
I have the following code
#define MAX 32
struct A
{
char carr;
int iarr;
int i;
};
void main()
{
|
by: Henryk |
last post by:
Hey there,
I have some problems with the following code snippet on a Virtex-4
PowerPC with a GCC based compiler
char chData;
sprintf(&chData, "%+05.0f", -0.038f); --I get "-000" ???
sprintf(&chData, "%+05.0f", -0.380f); --I get "-000" ???
sprintf(&chData, "%+05.0f", -3.800f); --I get "-0004" ok
|
by: krister |
last post by:
Hello,
I'm working in a quite large system that has some limitations. One of
those is that I can't use printf() to get an output on a screen. I'm
forced to use a special function, let's call it PrintOnConsole(), to get
the output on a console. The problem with PrintOnConsole() is that it
only takes strings as input arguments. On the other...
|
by: google |
last post by:
Consider the following code:
char str;
char str2;
strcpy(str, "%alfa% %beta% d%100%d %gamma% %delta%");
printf("printf: ");
printf("1%s2", str);
printf("\nsprintf: ");
sprintf(str2, "1%s2", str); //Interesting stuff happens here
printf(str2);
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|