Trouble with C


 
Thread Tools Search this Thread
Top Forums Programming Trouble with C
# 1  
Old 03-22-2011
Trouble with C

Hey, i am having a problem

First, i know java well and i have used C++ on occasion so i thought i would be able to deal with a class where they program in C. unfortunately i have hit some speed bumps that i am having problems.

Here is my problem:

I have a structure cache_t in the sample program we are supposed to use. In one of my functions i am supposed to use a pointer to an instance of this cache_t struct to perform some operations and return a value.


Code:
struct cache_t
 {
  int nsets;
....
}
cache_access(struct cache_t *cp,....)

How do i get the value of nsets? i have tried &cp.nsets but that just gives me an error:
error: request for member 'nsets' in something not a structure or union

---------- Post updated at 02:32 AM ---------- Previous update was at 01:10 AM ----------

ah, nevermind. As i guessed it was my inexperience with C causing problems. I was looking for cp->nsets.

Thanks anyways for looking.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

gnuplot trouble

I am having a bit of trouble plotting a histogram in gnuplot. I am trying to use it to draw bars side by side. The first bar is from column five in my data file. The second bar is actually three bars stacked on top of each other and should be as tall as the first bar. The data is from the 2nd,... (0 Replies)
Discussion started by: kingnothing
0 Replies

2. UNIX for Dummies Questions & Answers

trouble with awk

I am trying to figure awk. I have a file in my home directory called testawk.sh, have made it executable, and have run it... But don't see any output. This is the contents of the file: #!/usr/bin/awk -f { print " - HI -" }I enter ./testawk.sh in the prompt, press enter, and watch as the... (2 Replies)
Discussion started by: matthewden
2 Replies

3. UNIX for Dummies Questions & Answers

X trouble

Hi there, I'm new to unix-environments. I'm richard, and i'm mostly a web-developer, under php. I've done work in unix env before, but never had my own. Today, I've got debian 3.1 r4 from the official site, and i've attempted to install it twice. I installed it initially as "Desktop... (0 Replies)
Discussion started by: izua
0 Replies

4. UNIX for Dummies Questions & Answers

trouble mounting

What is the possible cause for the mount command to take ages? im trying to mount remotely : "mount -t nfs xx.x.x.x:/export/xyz/cdrom-4.0 /mnt/cdrom" on a system using bash. Im able to ping the remote server, but the system hangs or takes about half an hour to carry out this mount command.... (4 Replies)
Discussion started by: sahilb
4 Replies

5. Shell Programming and Scripting

Trouble with Backslashes

Hi folks, there are windows device names in the sixth column of a comma separated file. A example device name is: \\.\Tape0 I don't get the all string in to a variable, because of the preceding backslash. The first backslash is just cut off and my attempts to manipulate the string afterward... (0 Replies)
Discussion started by: wibo1
0 Replies

6. Solaris

Trouble with tr

I'm not sure where to post this but it's happening on a SunOS 5.8 server so I'll try here. I've discovered some unexpected behavior when using tr. For example: echo a | tr Z echo b | tr a echo a | tr B echo a | tr B echo a | tr A (8 Replies)
Discussion started by: Mike@Work
8 Replies

7. AIX

license trouble

Hi, we currently use a valisys licence : it is based on a server (serv1) it is reached only by one workstation (cam1) In all licence files there is line with cam1 et serv1 We want to use cam22 (new workstation) instead of cam1 I made a copy the licences files with remplacing cam1 by cam22... (0 Replies)
Discussion started by: cadmanager
0 Replies

8. UNIX for Dummies Questions & Answers

The trouble about SU ...

Hi all, having read lots of posts about SU I don't quiet understand this : I'm doing regular backups of my database (u betta do) and therefore use su - username -c "sqlscript special data_base" in a unixscript which is even using cron. (yep!) Now I need some other script, still with this... (4 Replies)
Discussion started by: nulnul7
4 Replies

9. What is on Your Mind?

The trouble with...

Welcome to "The trouble with...." with your host, ZazzyBob. Todays offering - "The trouble with letting other people host your website" I use a certain web hosting service, who shall of course remain nameless here. They are running PHP 4.3.10 I decide to write a script to test their PHP... (6 Replies)
Discussion started by: zazzybob
6 Replies

10. UNIX Desktop Questions & Answers

trouble

Hello, The system reboots in single user mode what command to use to bring the system up regularly?? I get INIT: cannot create /var/adm/utmpx Type control -d to proceede with a normal startup or give root passwd for system maintaince. either way i don't have a change and ... (1 Reply)
Discussion started by: awk
1 Replies
Login or Register to Ask a Question
schemagen(1)						      General Commands Manual						      schemagen(1)

NAME
schemagen - Java(TM) Architecture for XML Binding Schema Generator Specification Version: 2.0 Reference Implementation (RI) Version: 2.0 ea3 Launching schemagen The schema generator can be launched using the appropriate schemagen shell script in the bin directory for your platform. The current schema generator can process either Java source files or class files. We also provide an Ant task to run the schema generator - see the instructions for using schemagen with Ant. For Solaris/Linux % path/to/jaxb/bin/schemagen.sh Foo.java Bar.java ... Note: Writing schema1.xsd For WindowsNT/2000/XP > path ojaxbinschemagen.bat Foo.java Bar.java ... Note: Writing schema1.xsd If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need to be given to the tool by using the -classpath/-cp options. Otherwise you will see errors when generating your schema. Command Line Options Usage: schemagen [-options ...] <java files> Options: -d <path> : Specify where to place processor and javac generated class files -cp <path> : Specify where to find user specified files -classpath <path> : Specify where to find user specified files -help : Display this usage message Generated Resource Files The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control the name of the generated schema files at this time. For that purpose, use the schema generator ant task. See Also o JAXB 2.0: * Release Notes @ http://java.sun.com/webservices/docs/2.0/jaxb/ReleaseNotes.html * XJC @ http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html * XJCTask @ http://java.sun.com/webservices/docs/2.0/jaxb/xjcTask.html * SchemaGen @ http://java.sun.com/webservices/docs/2.0/jaxb/schemagen.html * schemagenTask @ http://java.sun.com/webservices/docs/2.0/jaxb/schemagenTask.html * Sample Apps @ http://java.sun.com/webservices/docs/2.0/jaxb/samples.html * Changelog @ http://java.sun.com/webservices/docs/2.0/jaxb/changelog2.html o JAXB 1.0.x: * Release Notes @ http://java.sun.com/webservices/docs/2.0/jaxb/jaxb-1_0.html * Changelog @ http://java.sun.com/webservices/docs/2.0/jaxb/changelog.html o JAXB RI Extensions: * Runtime Properties @ http://java.sun.com/webservices/docs/2.0/jaxb/vendorProperties.html * XJC Customizations @ http://java.sun.com/webservices/docs/2.0/jaxb/vendorCustomizations.html * Develop Plugins @ http://java.sun.com/webservices/docs/2.0/jaxb/developPlugins.html o JAXB RI Schema Languages: * W3C XML Schema @ http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#xschema * RELAX NG @ http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#relaxng * DTD @ http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#dtd o JAXB Community: * Java.net Homepage @ http://jaxb.dev.java.net * Developer interest list @ https://jaxb.dev.java.net/servlets/ProjectMailingListList * FAQ @ https://jaxb.dev.java.net/faq/index.html 07 Aug 2006 schemagen(1)