Ubuntu :: Field 'struct' Has Incomplete Type
May 13, 2011
I'm building a symbol table and syntax tree using lex and yacc for a compiler.
I am stuck with an error for too long. I have defined two structures (one for Symbol Table and another for Syntax Tree).
Code:
typedef struct symbolTable{
char name[30];
.....
struct symbolTable *next;
[Code]......
here's the error:
bottomup.y:76: error: field 'info' has incomplete type.
I tried to define the structure definitions in a separate header file and included in .y file but it didn't work out.
I'm trying to get this done ASAP.
View 1 Replies
ADVERTISEMENT
Jan 26, 2010
I'm trying to compile a program and it gives me the following:
I checked cmath-util.h:46 and cmath-util.h:48:
I'm not a C person, and the author is unavailable so far.
View 5 Replies
View Related
Sep 16, 2010
when i compile the device driver of led ,i get the erro like this:
[root@localhost led]# arm-linux-gcc -D__KERNEL__ -DMODULE -I /home/liumeng/lmldd
/linux-2.6.34.1/ -c -O -Wall led.c -o led.o
led.c:34: error: variable `GPIO_LED_ctl_ops' has initializer but incomplete type
[code]....
View 1 Replies
View Related
May 15, 2011
I am playing around with a new chat program and I have errors that I can not figure out. Here is what I am getting.
parse.c:1638: error: dereferencing pointer to incomplete type
parse.c:1638: error: dereferencing pointer to incomplete type
parse.c:1638: error: dereferencing pointer to incomplete type
here is the code:
if (scan->jail_timeout == 0 && scan->location == prison)
{
command_type |= HIGHLIGHT;
tell_player(scan, " After serving your sentence you are flung out"
[code]....
View 6 Replies
View Related
Sep 10, 2009
I installed fedora lastnight, but any addresses I type in the field is returning server error, but if I type the IP address it will work, I reinstalled Fedora 11 about 3 times, samething.
View 1 Replies
View Related
Sep 12, 2010
I have just done a fresh install of OpenSuse 11.3 I am using KDE4.When I move my mouse and click on a text field, I start typing and the first few keypresses are ignored. Or if I stop typing and pause for a bit without moving the mouse or doing anything, then when I press the next key it is ignored again.If I go to System settings -> accessibility, neither slow keys, bounce keys or sticky keys are ticked.The effect of this is that if I momentarily pause for thought in the middle of writing then sometimes half a word can go missing. Unfortunately this makes the desktop extremely difficult to use as I am always having to check that all my key presses have been accepted.
View 7 Replies
View Related
May 18, 2010
I've had a very colorful morning learning the innerparts of Linux's sort command, and have come across yet another issue that I can't seem to find an answer for in the documentation. I'm currently using -t, to indicate that my fields are split by the comma character, but I'm finding that in some of my files, the comma is used (between double-quotes) within values:
Jonathan Sampson,,foo@bar.com,0987654321
"Foobar CEO,","CEO,",ceo@foobar.com,,
How can I use a comma to terminate my fields, but ignore the occurences of it within values? Is this fairly simple, or do I need to re-export all of my data using a more-foreign field-terminator? (Unfortunately, I do not have any control over declaring a different terminator with this particular project).
View 2 Replies
View Related
Mar 28, 2010
I'm trying to display fields from flat files where the first 8 fields are always the same. Fields 9 - n are varied but will contain specific patterns I'm after. I'm using this so far because "mySearch" is on each line I want to examine.
Code:
How would you pattern match and include 2 additional fields above field $9 but change field position from line to line?
View 12 Replies
View Related
Jan 8, 2010
How can print the, let's say 5nd field to the last field of every record (let's say we have 10 fields)?
I mean: I cant avoid to have to do:
print '{$5 $6 $7 $8 $9 $10}'
View 2 Replies
View Related
Apr 27, 2009
I am creating a game with random variables. In the game I have created a dialogue exchange to players. I have set up a table with various returns and I inserted {$fields} to represent various random variables. When I call on the requested fields, I only see the field text and my field names. Am I supposed to parse something and call it back another way?
ie: myfield is: "You have won {$random1} silver! <br />{$wi['gender'] majesty rewards you well." the code I am using to call that field is:
View 11 Replies
View Related
Dec 14, 2010
i have a file : file.dat with following data
Code:
STORAGE PERCENTAGE FLAG:
/storage_01 64% 0
/storage_02 17% 1
/storage_03 10% 0
/storage_04 50% 1
I need to get the value of PERCENTAGE in a variable for a value of storage passed as variable i have tried the following without success like :
Code:
percentage='awk -vx="$defaultStorage" '{FS=OFS=" "}$1==x{print $2}1' file.dat
View 2 Replies
View Related
May 23, 2011
I have an old C application in which i am trying to include some STL cointainers. When i use the STL container alone it works fine, but when i include it into a C struct i have segmentation faults errors. I know that it is not a good idea to mix C and C++. Considering this code:
Code:
typedef struct{
int shmid;
...
APPLSPACETYPE applSpace;
[code]...
and how to make a malloc for this issue; something like :
Code:
mem->applSpace.rData.completeGroups2zeroGroup=(map_completeGroups2zeroGroup_type *)malloc((sizeof(map_completeGroups2zeroGroup_type)+1)* sizeof(char ));
View 11 Replies
View Related
Apr 8, 2011
Is is possible to use a class inside a struct? I keep getting segmentation fault with this code:
Code:
struct my_struct {
unsigned count;
std::string msg;
[code]....
View 3 Replies
View Related
Nov 6, 2010
I have been spending time (starting yesterday) reverse-engineering GTK+ to get my programming skills up. I came across a struct in the headers (_GtkArg, which was then typedeffed into GtkArg) that includes a union in it that has pretty much the same properties as a struct. Then, there was a struct inside the union.
I'm confused. Just what is the difference between a union and a struct?
P.S. I am using GTK's native C programming language.
View 8 Replies
View Related
Mar 30, 2010
How do we allocate memory of struct? what i did was
Code:
int main()
struct amp
{
[code].....
cout <<"The size of 'struct' is"<< sizeof(struct amp)<<"and it is located at"<<struct amp*s = malloc(sizeof(struct amp))<<endl;
it gives me an error---
In funtion 'int main()':
error: expected primary-expression before 'struct'
error: expected ';' before 'struct'
View 9 Replies
View Related
May 14, 2010
For a work project, I've got a bunch of python code from about a year ago that controls the movement of our EVI-D30 camera over a ttyUSB connection. It used to work fine on a 32-bit Fedora box, but recently we moved our whole project over to a 64-bit Gentoo server, and the same code seems to be worthless on the new platform. I didn't write the code, so I'm have trouble figuring out how to fix it. Error messages usually look like this:
Code:
File "./CameraController.py", line 172, in pan
turn_callback(cmdStruct[0], cmdStruct[1])
File "./CameraController.py", line 147, in turn_callback
cameras[camera].TiltUp()
[code]....
View 13 Replies
View Related
Jan 17, 2011
is there any problem that might rise by by having a vector as a member of struct in c++ as follows.ex.
struct A
{
int a;
[code]...
View 2 Replies
View Related
Mar 11, 2010
I having a nested structures which are referenced with pointer variables :
example :
typedef struct {
int a ;
char *b ;
int *c ;
}EXP2 ;
[Code]...
While trying to access the value of sv.exp2->a it throws segmentation fault error.How to acess this variable ??
View 3 Replies
View Related
Jul 3, 2010
I downloaded the oxygen cursors and oxygen cursors extras form the official ubuntu repos using synaptic. I am running gnome in ubuntu lucid with compiz and emerald. I installed them system wide by running
Code: sudo update-alternatives --config x-cursor-theme This means that they are displayed eveywhere. However, there appear to some bits missing from the cursor set. Specifically, the window resize icons and the drag and drop (move) icon. All other icons are displayed correctly. For the missing icons, it seems to fall back to the default ugly black x cursors. Has anybody else seen this, or have I installed these cursors incorrectly? Note I want to do this system wide so I have the same cursor even in my sudoed apps.
View 1 Replies
View Related
Apr 23, 2010
I am looking for this struct messages_sdd_t and I need to search through a lot of *.c files to find it. However, I can't seen to find a match as I want to exclude all the words 'struct' and 'messages_sdd_t'. As I want to search on this only 'struct messages_sdd_t' The reason for this is, as struct is used many times and I keep getting pages or search results. I have been doing this without success:
find . -type f -name '*.c' | xargs grep 'struct messages_sdd_t'
and this
find . -type f -name '*.c' | xargs egrep -w 'struct|messages_sdd_t'
View 2 Replies
View Related
Jul 2, 2010
I following structure
typedef struct
{
[code]...
View 5 Replies
View Related
Feb 5, 2011
I have what should be a relatively simple program (fadec.c) that maps a struct from an included header file (fadec.h) to a shared memory region, but Im struggling accessing members in the struct from the pointer returned by shmat. Ultimately, I want to access members in the shared memory structure with a globally declared version of the struct, shm__. Not only do I not know how to accomplish that, but I cant even seem to access members of the shared struct directly from the pointer itself (compiler complains about dereferencing pointer to incomplete type). Im at a loss and could use another set of eyes if you guys dont mind taking a gander:
Compile Errors:
tony-pc:/cygdrive/p/test> cc -o fadec fadec.c
fadec.c: In function 'main':
fadec.c:30: error: dereferencing pointer to incomplete type
fadec.c:31: error: dereferencing pointer to incomplete type
[Code]...
View 1 Replies
View Related
Jun 2, 2010
int GetTime(struct timeval tv)
{
gettimeofday(&tv, NULL)
printf("%d
", tv.tv_sec); /* here is the right value */
return 0;
}
[Code]....
What happend? struct timeval has a self timer?
View 3 Replies
View Related
Feb 4, 2011
In my system around 73gb(pc-desktop) i have,1 primary partition(windows)-25gb, 1-extended partition(remaining gb) 3 logical partitions were there in (under) extended partition in one of the logical partition is d:drive. in my hard disk d: drive is -/dev/sda5
previosly i was fat -file system , (d:drive-/dev/sda5), i remember i changed the d: drive(d:drive-/dev/sda5) file system to ext4file system ,with following command using terminal
After doing(changing the file system)this one ,i couldnt see the d:drive data
By doing that
1q) Did i reformatted the partition? i think the new filesystem(ext4) has no knowledge of the data that was on it when it had a FAT filesystem.
2q) How to do undo operation,i tried to change the filesystem type to fat/ntfs in terminal using command --sudo mkfs -t FAT /dev/sda5.
Result:its showing text message-'mkfs.FAT: No such file or directory'(not in single quote)
I had very imp data in d:drive
View 1 Replies
View Related
Feb 26, 2010
I just loaded octave. I ran through a few examples of how to implement a script file. Everything works until I get to "plot". When I run the "plot" command I get the following.
octave:2> test1.m
error: can't perform indexing operations for <unknown type> type
sh: gnuplot: not found
Just to double check my work, I ran the following code:
y=[1 2 3];
plot(y);
View 3 Replies
View Related
Oct 16, 2010
I have setup FTP Server on my Windows machine with Filezilla server. Now, if I try to copy files from it using Ubuntu 10.04, Lucid, it downloads incomplete files if I don't switch to binary mode.
Is there some config issue from Ubuntu client or something needs to be changed from Windows Client.
View 4 Replies
View Related
May 26, 2011
Using Ubuntu Server 10.04 LTS. I'm new to Ubuntu and testing Rsync. I successfully copied 3TB of data from a Win7 machine to an MDADM Raid5 array. All appears to be fine. Used a Win app for the copy. I then deleted a 250GB folder on the Raid5 array and recopied the data using Rsync. Rsync was executed via a Putty session on a WinXP machine. The source was an eSata attached drive (same drive used for the big 3TB copy) and the destination was the same Raid5 array. That copied just fine. I bit verified it with a Win7 app. Perfect.
I then used the following Rsync script to copy a single 26GB file from that same eSata drive back to (what I intended to be) the Raid5 array:
Code:
neil@ANTECUBSV:/mnt$ rsync -r -a -v -e ssh --delete /mnt/disk1/Test/ /mnt/Test
sending incremental file list
created directory /mnt/Test
./ C_VOL-S300-b001.spf
sent 3020267622 bytes received 34 bytes 50760800.94 bytes/sec
total size is 3019898880 speedup is 1.00
neil@ANTECUBSV:/mnt$ cd raid
Note that only about 3GB copied. No error messages were posted to the putty session. I made a mistake in the Rsync command, creating the Test folder directly in the mount folder rather than the Raid array, as I intended. That is a little strange, yes, but I would not think it would cause a partial copy? The /mnt folder is on my system drive, which had about 34GB available space before the copy, so comfortably would have had 6GB or so after.
The eSata disk is mounted as /mnt/disk1
The Raid5 array is mounted as /mnt/raid
I then recopied the file to the correct intended destination on the Raid5 array, which has about 400GB free space (plenty).
Code:
neil@ANTECUBSV:/mnt/raid$ rsync -r -a -v -e ssh --delete /mnt/disk1/Test/ /mnt/raid/Test
sending incremental file list
./
deleting 2010-07-05 Backyard Birds/Thumbs.db
deleting 2010-07-05 Backyard Birds/
C_VOL-S300-b001.spf
sent 11105775462 bytes received 34 bytes 50366328.78 bytes/sec
total size is 11104419840 speedup is 1.00
neil@ANTECUBSV:/mnt/raid$ df -h
Note that only about 11GB was copied, and this was confirmed with an ls -l command. Now I am correctly copying the file to the Raid array but it is still incomplete. I then copied the file back to the /mnt folder to see if the problem reproduces:
Code:
neil@ANTECUBSV:/mnt/raid$ rsync -r -a -v -e ssh --delete /mnt/disk1/Test/ /mnt/Test
sending incremental file list
created directory /mnt/Test
./
C_VOL-S300-b001.spf
sent 26327927554 bytes received 34 bytes 56558383.65 bytes/sec
total size is 26324713984 speedup is 1.00
neil@ANTECUBSV:/mnt/raid$ cd /mnt/test
This time I got my full 26GB file. Why I might be getting inconsistent results? This is quite troubling of course. I'd also be interested in basic a command line Linux diff app (that does file directory as well as bit level checking) if one is available.
View 9 Replies
View Related
Mar 9, 2011
I've setup .htpasswd and a .htaccess file.
The password is a0bc0def0g3
If i enter that password, it let's me in.
if i enter a0bc0def0g it also works. I've never seen this before and is totally weird.
View 3 Replies
View Related
May 26, 2010
Is it possible to create a global struct variable with predefined member values?Only one instance of that struct is ever needed.
View 1 Replies
View Related
May 3, 2010
I want to read a pressed key or a combination of pressed keys from the keyboard and perform some action afterwords.
e.g.
Ctrl-Alt-F1
Out of ncurses lib. and the termios struct which can be used best for the above purpose and why ?I tried to search on Google, the differences between these two but couldn't get much !
View 6 Replies
View Related