Re: strcat and three strings
alternativa <alternativa.4@xxxxx> wrote:
> I have a following problem: I'm creating a list and one of the fields
> should contain the date. Firstly I ask the user for the year, month and
> day and then I'd like to collect all this data in one field. To do this
> I tried to concatenate those 3 numbers into one using strcat. A piece
> of code is as follows
>
[...]
>
> I think the result should be "year-month-day".. Why it doesn't work?
My first suggestion is that you did not allocate any space for your
data, you only defined the pointers. Please post a complete program
instead of only a snippet.
--
:wq
^X^Cy^K^X^C^C^C^C
.
Relevant Pages
- Re: Ranting about JVMs default memory limits...
... Originally, 32-bit Windows split it half and half, with the user code getting 2GB and the OS getting 2GB. ... But, the OS didn't really need 2GB of address space, and so enabling "LARGEADDRESSAWARE" tells the OS that the application doesn't make any assumptions about the range of pointers and that it can pass user data addresses to the process in the first 1GB of the second 2GB of the full 4GB address space. ... Memory blocks aren't moveable, so allocations can sit in between two free blocks, limiting the size of the largest block that can actually be allocated. ... Depending on the allocation pattern, it's not hard at all to have over 1GB of virtual address space left, but not be able to allocate any single block nearly that large. ... (comp.lang.java.programmer) - Re: Pointers vs. allocatable arrays in derrived types
... An important difference is that allocatable components require the ... you should only use pointers in situations where you ... Becasue you can allocate through a pointer, ... Assignment for pointer and allocatable components is completely ... (comp.lang.fortran) - Re: Pointers vs. allocatable arrays in derrived types
... An important difference is that allocatable components require the ... you should only use pointers in situations where you ... to a pre-existing target, and the like. ... Becasue you can allocate through a pointer, ... (comp.lang.fortran) - Re: Fat references
... My original motivation was to evade typeless null pointers that afflict ... massively degrading the performance of most uses of lists. ... which I can similarly allocate out ... it also mixes much better with C than with tagged references, ... (comp.compilers) - Re: compilation of ms crypto api program
... I was referring to the trick that uses pointers. ... allocate memory of the size of the base type. ... the largest variant record part. ... >>mostly in languages that e.g. allow dynamic allocation of stack memory. ... (sci.crypt) |
|