Sponsored Content
Top Forums Programming Scanf() string pointer problem Post 302874309 by yifangt on Thursday 14th of November 2013 05:13:05 PM
Old 11-14-2013
That was really subtle and, fundamental, too. I can't get it until you pointed out!
This bugged me sooooo much, and I had thought my understanding is totally wrong. Fortunately I am on the right track, not that far away from right, at least.
Thank you very much again!
This User Gave Thanks to yifangt For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

Scanf problem under LINUX...

I have a problem reading characters from keyboard with the scanf function. Here there is a little piece of code: #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> /* The last 3 libraries are included because in the real program I use some... (4 Replies)
Discussion started by: robotronic
4 Replies

2. Programming

Problem with function which reutrns pointer to a value

i have a function: char *pcCityIdToCountryName(ADMIN_DB_DATA *pstHEader, unit uiCityID) this returns a pointer to CountryName if cityId is given. to retrieve countryname i give: char *CountryName; CountryName = pcCityIdToCountryName(..................); but when i compile it is giving :... (5 Replies)
Discussion started by: jazz
5 Replies

3. Programming

problem with scanf

hi all! i've written a simple c program: #include<stdio.h> #include<stdlib.h> int main() { int a; char b; char c; ... (4 Replies)
Discussion started by: mridula
4 Replies

4. Programming

pointer problem

could any one tell why the following is showing segmentation fault while using **ptr but working fine using **a #include<stdio.h> ... (1 Reply)
Discussion started by: useless79
1 Replies

5. Programming

String and pointer problem

i am having a string like " X1 " ---> string lenght is 30 I have stored this to a chararry . ref so here ref = " X1 " now i trim the left space by my function . Si the string now becomes "X1 " ---> string lenght is 15... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

6. Programming

pass a pointer-to-pointer, or return a pointer?

If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it: (1) one is to pass a pointer-to-pointer parameter, like: int my_malloc(int size, char **pmem) { *pmem=(char *)malloc(size); if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies

7. Programming

segfault in pointer to string program

hello all, my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic. ... (4 Replies)
Discussion started by: zius_oram
4 Replies

8. Programming

pointer problem

Does anyone know? int x = 1; int *p = &++x; //ok ! int *q = &x++; //gives an error :O why the first pointer is ok but the second is an error? (13 Replies)
Discussion started by: nishrestha
13 Replies

9. Programming

How i use pointer as a string in c programing?

I'm newbie learner. My all friend use windows just only me use linux. so i can't solve any problem by myself. i need a solution. how can i use pointer as a string. #include<string.h> #include<stdio.h> int main() { char *s='\0'; gets(s); puts(s); return 0; } This code work on... (6 Replies)
Discussion started by: raihan004
6 Replies

10. Programming

String pointer does not work

Hello, I am trying to reverse complement one string and reverse another (NO complement!), both with pointer. My code compiled without error, but did not do the job I wanted. #include <stdio.h> #include <stdlib.h> #include <zlib.h> #include "kseq.h" // STEP 1: declare the type of file... (5 Replies)
Discussion started by: yifangt
5 Replies
AFINITAESCHANNELDATA(3) 												   AFINITAESCHANNELDATA(3)

NAME
afInitAESChannelDataTo, afInitAESChannelData - initialize AES non-audio data in an audio file setup SYNOPSIS
#include <audiofile.h> void afInitAESChannelDataTo(AFfilesetup setup, int track, int willHaveData); void afInitAESChannelData(AFfilesetup setup, int track); PARAMETERS
setup is a valid file setup returned by afNewFileSetup(3). track specifies a track within the audio file setup. track is always AF_DEFAULT_TRACK for all currently supported file formats. willHaveData is a boolean-valued integer indicating whether AES non-audio data will be present. DESCRIPTION
Given an AFfilesetup structure created with afNewFileSetup(3) and a track identified by track (AF_DEFAULT_TRACK for all currently supported file formats), afInitAESChannelDataTo initializes the track to contain or not contain AES non-audio data. afInitAESChannelData behaves similarly but always initializes the track to contain AES non-audio data. Currently only AIFF and AIFF-C file formats can store AES non-audio data; this data is ignored in all other file formats. ERRORS
afInitAESChannelDataTo and afInitAESChannelData can produce the following errors: AF_BAD_FILESETUP setup represents an invalid file setup. AF_BAD_TRACKID track represents an invalid track identifier. SEE ALSO
afNewFileSetup(3) AUTHOR
Michael Pruett <michael@68k.org> Audio File Library 0.3.6 03/06/2013 AFINITAESCHANNELDATA(3)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy