itoa Questions
14
Solved
I recently read a sample job interview question:
Write a function to convert an integer
to a string. Assume you do not have
access to library functions i.e.,
itoa(), etc...
How would you g...
Dialogize asked 20/10, 2010 at 21:8
2
Solved
I want to convert an integer into a string of numeric characters in C.
I've tried using itoa, but it's non-standard and not provided by my C library.
I tried to implement my own itoa, but it's no...
3
I'm trying to convert an int into a string by doing this:
int id = 12689;
char snum[MAX];
itoa(id, snum, 10);
I get the following error:
'itoa': The POSIX name for this item is deprecated. In...
6
Solved
I'm working on Eclipse inside Ubuntu environment on my C++ project.
I use the itoa function (which works perfectly on Visual Studio) and the compiler complains that itoa is undeclared.
I included...
Lowminded asked 26/9, 2010 at 20:11
3
Solved
Why this distinction? I've landed up with terrible problems, assuming itoa to be in stdlib.h and finally ending up with linking a custom version of itoa with a different prototype and thus producin...
7
Solved
I'm running some test cases against my itoa() function but keep getting
did not allocate memory for the int min value
I'm doing the check but it's something I'm missing here, what is it?
char ...
3
Solved
I tried to find a lisp function to convert between numbers and strings and after a little googling I fond a function with the same name. when I entered (itoa 1) SLIME printed:
Undefined function ...
Dahlia asked 25/4, 2013 at 16:59
2
Solved
if I include stdlib.h then also itoa() is not recognized. My code :
%{
#include "stdlib.h"
#include <stdio.h>
#include <math.h>
int yylex(void);
char p[10]="t",n1[10];
int n ='0';
%}...
18
Solved
I was wondering if there was an alternative to itoa() for converting an integer to a string because when I run it in visual Studio I get warnings, and when I try to build my program under Lin...
3
Solved
Say I have
constexpr const std::uint8_t major = 1;
constexpr const std::uint8_t minor = 10;
constexpr const std::uint8_t bugfix = 0;
and I want
constexpr const char* version_string(){ ... }
t...
2
Solved
tl;dr
I want to call QString::number(int) many times per second. It is very slow: seems like it allocates a new string each time. Tried to use setNum on same string instead, still no joy.
Orig...
Sos asked 3/5, 2014 at 11:56
2
Solved
I have a question about unsigned ints.
I would like to convert my unsigned int into a char array. For that I use itoa. The problem is that itoa works properly with ints, but not with unsigned int (...
Allsun asked 16/6, 2013 at 10:40
5
Solved
I am trying to create a char array in C, to fill it with the digits of an int, but the int can be of any number of digits.
I'm using a created function called getDigits(int num), that returns a nu...
1
Solved
This might sound like a silly question... But I can't find anywhere what the "a" in strconv.Itoa actually stands for. If its taking an integer and turning it into a string, why isn't the function c...
3
Solved
I am trying to convert an integer to char array and I came across this piece of code
int i = 5;
std::string s;
std::stringstream out;
out << i;
s = out.str();
But when I try to print the v...
2
Solved
I'm trying to convert an integer to a character to write to a file, using this line:
fputc(itoa(size, tempBuffer, 10), saveFile);
and I receive this warning and message:
warning: implicit decla...
2
I was looking for a way to convert an integer to a string in a portable manner (portable among at least Windows & Linux and x86 and x86_64) and I though itoa(X) to be standard just like atoi(1)...
Prowl asked 9/2, 2010 at 0:12
1
Solved
I'm currently working with a PLC that supports ANSI C, but uses its own flavour of the GNU compiler, which doesn't compile any variadic functions and things like itoa. So using sprintf & co. is...
5
Solved
Visual Studio is yelling at me about using itoa() saying to use _itoa() instead?
It looks to me like they are the same function. What gives?
Finicky asked 19/10, 2009 at 2:47
1
© 2022 - 2024 — McMap. All rights reserved.