Programming :: Book Example Of Own Type Variable Initialization Wont Work?

Nov 8, 2010

Its an example froom a book... and it does not work...

Code:
#include <stdio.h>
int main ( int argc, const char * argv[] ) {

[code]....

View 4 Replies


ADVERTISEMENT

Programming :: C++ Variable Type Followed By *?

Jul 1, 2010

In C++ what does the suffix, "*" mean appended to a variable type, e.g., "char* variable1;"?

View 3 Replies View Related

Programming :: Variable `GPIO_LED_ctl_ops' Has Initializer But Incomplete Type?

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

Ubuntu Installation :: Warning: Initialization From Incompatible Pointer Type

May 21, 2011

i have a minimal ubuntu desktop and i'm trying to install the latest nvidia driver (downloaded from their website) and i got the following error:

Quote:

/tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c: At top level:
/tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c:426:5: error: unknown field �ioctl� specified in initializer
/tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c:426:5: warning: initialization from incompatible pointer type

[code]....

i had to apt-get even gcc and make, so i'm probably missing some required package...

View 1 Replies View Related

Programming :: Get A Variable To Work As The Index Of An Array?

May 3, 2010

I am having a little trouble with a Bash shell script that I am working on. It is intended to read the information out of a gedcom genealogy file and determine who has lived in a particular area and output a report based upon who lived in a given area (like the different sections of a bygdebok for example). I am having a number of issues.

1) I can't seem to figure out how to get a variable to work as the index of an array. For example, I am trying to use the variable $individual to count which individual is being read in from the .ged file, and once that is figured out, next I will read in the individual's name, so I would like to create an array of names using the variable

Code:
$individual
as the index of the array. However, if I try the code
Code:
name[$individual]=$lineoftext;

[Code]....

I included only the last few lines of output as to not take up too much space because the output goes on forever, but you get the point from the example. This output has nothing to do with what the final output of the program is intended to be like. It is merely a test to prove that the 2 variables in question are getting their date loaded in properly.

View 14 Replies View Related

Programming :: Bash - Read Content Of File To Variable And Use This Variable In For Loop ?

Aug 21, 2009

I'm trying to read content of file to variable and use this variable in for loop. The problem is, when I have c++ comment style in file - /*. Spaces in line are also interpreted as separated lines.

For example:

Code:

Changing $files to "$files" eliminate these problems but causes that whole content of variable is treated as one string (one execution of loop).

View 6 Replies View Related

Programming :: Make A New Variable With The String From The Old Variable Btut Without Any Plus Sign?

Apr 7, 2010

my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.

i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't

foo=+12.40
bar=${foo#+}

View 4 Replies View Related

Programming :: Search Within A Variable And Assign The Results To A New Variable?

Apr 25, 2011

how I can search within a variable and assign the results to a new variable. I'll use the following as an example -

cars="Audi BMW Cadillac Chevy Dodge Ferrari Ford Mercedes"
list=`echo ${cars} | egrep -o '<A?+|<C+'`

with the echo command I get the following output assigned to list -

A
C
C

What I'd like to get for output is -

Audi
Cadillac
Chevy

how I could do this regardless of upper/lower case letters?

View 5 Replies View Related

Programming :: Get "data Type" Of An "unknown Variable" In "C Language"?

Jun 13, 2009

I am going to write a function which will do different operation base on the data type of the input parameter.

I am using C (Pure C, not C++).

The problem is that I do not know how to get the data type of the input parameter in C Language.

Can anyone tell me how to do this.

View 8 Replies View Related

Programming :: Error - Array Type Has Incomplete Element Type

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

General :: Use Result To Be Saved In Variable - Which Type Would It Be In Script

Feb 5, 2011

If I want to use that result to be saved in a variable, which type would it be in script? For clearing: let variable x and destination path is y/z

in prog.sh:
x=du -hb /y/z
echo $x

Q1: What type of x?

Q2: What option instead of -hb to presedent the size in kib?

View 11 Replies View Related

Programming :: Headers From Richard Stevens Network Programming Book Not Installing

Oct 27, 2010

I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.

View 5 Replies View Related

Programming :: Assign Value Of C Variable To Shell Variable?

Apr 28, 2010

included shell script inside c program, and i wanted to assign the value of c variable to shell variable..Can any one please suggest me how to do it?

View 8 Replies View Related

Ubuntu :: Unison Not Working - Uncaught Exception Gtk.Error("GtkMain.init: Initialization Failed Ml_gtk_init: Initialization Failed")

Jul 30, 2010

So I installed the Unison synch software with sudo apt-get install unison-gtk. When I set up the two directories for synchronization it looks like this: $ unison ssh:\SERVER\pathpath /var/www/path/path/path

I am getting this error in terminal Uncaught exception Gtk.Error("GtkMain.init: initialization failed ml_gtk_init: initialization failed") Fatal error: exception Util.Fatal("Error in getLogch: /home/path/.unison/unison.log: No such file or directory"

View 1 Replies View Related

Programming :: Book To Learn Programming In C ANSI?

Jul 11, 2011

What book you recommend to learn programming in C ANSI ?

View 1 Replies View Related

Programming :: Assignment To A Variable Variable?

Mar 17, 2011

This loop is part of a bash script which takes multiple arguments.

Code:
for ((i=1;i<=$number;++i)) ; do
offset=$(($i+5))

[code]...

View 3 Replies View Related

Fedora :: Cant Get Any Comic Book Reader To Work?

Nov 8, 2010

im currently using fedora 14 kde and i cant find a working comic book reader, i currently have the comic "the last man" and all the files are in .cbr, if someone could help me with this it would be greatly appreicated, i have tried installing mulitple comic book readers, so mabye a lil step by stepalso while i am posting, i currently use yumex to download all of my apps and stuff but some are out of date is there any way to update all the databases to recieve the most up to date apps?

View 6 Replies View Related

Programming :: Book Recommendation For C++ GUI Programming?

Apr 13, 2011

I am not new to PC programming. I have been able to write C++ console programs. They are not too hard to write.Now, I want to move up to the Linux C++ Graphical User Interface (GUI) programming.Can an experienced member of the Linux community recommend a good reference book for programming the GUI windows?

View 14 Replies View Related

Programming :: Get Different Result Of Matrix Op On Hw Rtw Book?

Jul 31, 2011

Dear Linux/c++/g++ programmers: the run result on my system, ubuntuLinux10.04(kernel2.6.35-25), gcc4.5.2 is not what book predict

source code
http://examples.oreilly.com/9780596007614/
11-28
11-29
11-24
#include "matrix.hpp"

[Code]...

View 13 Replies View Related

Programming :: The Perfect Javascript Tutorial Or Book?

Jul 30, 2011

I'm looking for javascript tutorials or books that meets the following criteria:

1. Very thorough: Starts with the most fundamental concepts and progresses logically from basic to advanced concepts, without skipping over important ideas for the sake of expediency.

2. Lots of small practice exercises that parallel the concepts and syntax being learned.

I've looked at a lot of tutorials, but they all tend to be lacking in one of these areas or the other.

View 1 Replies View Related

Programming :: Good Book To Learn About Threads In C / C++?

Oct 30, 2010

A good book to learn about threads in C/C++?

View 3 Replies View Related

Programming :: Convert The String Data Type To Other Primitive Data Type?

Mar 4, 2011

I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.

Code
====
#include <vector>
#include <iostream>
#include <string>

[Code].....

View 7 Replies View Related

Programming :: Certain Book Search - Checking Of Case Insensitive

Jan 19, 2010

I am trying to do a search for the certain books, and I am trying to make it case insensitive. what I have come up with so far is this :

Code:
Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3
StUPiD:JERLYN:20:40:3

Code:
echo -n "Title: "
read Title
echo -n "Author:"
read Author
echo ""
valuecheck='grep -i "$Title" Database.txt | grep -i "$Author" | awk -F":" '{ print $1}''
echo $valuecheck
if [ $Title = $valuecheck ] ; then
echo "HOHOHO"
else
echo "too bad"
fi

The issue which I am having is that, when it does the search for the correct row to be inputted into valuecheck, it will input the value as written in the database, which is in Uppercase. For this case, if I type in stupid for $Title and jerlyn for $Author, it searches the correct row, but the awk will print "STUPID" into the variable as that is what is written in the database. So how can I make my if statement case insensitive? Currently it reads like this:

Code:
if [ $Title = $valuecheck ] ; then
which means
if [stupid = StUPiD ] ; then

How can I make the if statement it case insensitive to allow it to display "HOHOHO"

View 5 Replies View Related

Programming :: Book Which Explains System Library Structure In Depth?

Sep 7, 2010

Has any one ever come across a book on Linux programming which explains a Library structure in depth?

View 3 Replies View Related

Ubuntu :: Can't Get The Variable "type" To Add The Line When Its Selected?

Jul 9, 2010

with my "if" statement? It's probably just a bracket or something stupid missing, but I cant get the variable "type" to add the line when its selected:

clear
read -p "Please Enter Printer Name : " name
read -p "Please Enter Printer IP : " IP
read -p "Please Enter Printer Description : " des
read -p "Please Enter Printer Location : " loc
read -p "Please Enter Printer Class : " clas

[Code]...

View 2 Replies View Related

Programming :: Make An Online PHP Contact / Phone Book With Simple PHP (no Database)?

Jul 5, 2011

I would like to unzip a simple PHP code files, to have a online PHP contact / phone book. Simply, slow, and not database oriented over complicated setups into settings. I have a PHP / web provider (free), not apache. WITHOUT SQL (like before it may exists) something like this [URL]

View 14 Replies View Related

Programming :: Pass Variable In Mysql Qyery In C Programming?

Dec 4, 2010

i want to pass variable in mysql qyery in c programming

View 1 Replies View Related

Ubuntu Networking :: Can Mount WD My Book World Edition NAS In Ubuntu 11 Without Extensive Terminal Work?

Jul 9, 2011

Can I mount a WD My Book World Edition NAS in Ubuntu 11 without extensive terminal work? The NAS has a static ip, it can be ping'd from Ubuntu, and my Windows machines access it just fine, no passwords required.I have not been able to find a way to make this work. Nothing against the terminal per se, it's just still a little too unfamiliar and I keep hitting error road blocks on this one.

View 4 Replies View Related

General :: Grub2 - HOWMANY Variable Does Not Work

Jan 15, 2010

I want try controls how many kernels should be put into the GRUB2 menu on my Ubuntu 9.10 but since GRUB2 the #HOWMANY variable doesn't work. I found this post on the LQ blog about the #HOWMANY variable. I follow these instructions but I have a problem when I execute the last command "update-grub" because my result is this :
Code:
/usr/sbon/grub-mkconfig: 228: GRUB_HOWMANY: not found
I verified my work but I don't understand why it's doesn't work.

View 5 Replies View Related

Programming :: Sed A Variable In Bash?

Mar 25, 2011

I have beat this enough and don't get what should have been a very simple thing to do. I build a variable;

Code:
CLIST=java,lua,python,php,perl,ruby,tcl
CLIST will be used by another bash script but I need to replace the commas with a space. I

[code]...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved