Programming :: Lvalue Required As Left Operand Of Assignment?

Feb 3, 2011

it's been a long time since I did coding in C, but thought to pick up a very old project again, just to show off what I have been working on ten years ago.I deducted my problem as follows:

Code:
#include <stdio.h>
#include <stdlib.h>
#define bit1 1
#define bit2 2

[Code]...

Why is it saying that bar->act is not a valid lvalue while both bar->act and the bit are cast to (long long)?

View 6 Replies


ADVERTISEMENT

General :: Error: Lvalue Required As Increment Operand

Jan 22, 2010

I got some sourcecode written with c++. I found it did not supported by the newer version of gcc. So I wanted to install an older version. But it always comes up with the question like "./read-rtl.c:653: error: lvalue required as increment operand", what should I do now?

View 6 Replies View Related

Programming :: Objects And Assignment In Interpreter?

Feb 9, 2011

I have it so that an Env object contains all the variables in the current scope, and the parent scope. You can also save them to variables like objects, and my idea is to use the "." operator to get values from them.

First, how do I assign to them? I currently have it that only a variable name can be assigned to, but you should be able to assign to an "obj.value" expression, too. How do I keep track of what variable to set and still be able to say it in an expression and have it evaluate to the variable?

Second, these object don't really have a "type", they're just containers that contain any values you want under any name you want. How can I, for example, define a primitive "boolean" object and have things like if statements recognize it?

View 14 Replies View Related

Programming :: Implement Left-associative Operators In Parser That Does Not Allow Left Recursion?

Jan 20, 2011

The first is about implementing function calls. The way I currently have it is that functions are called with a C++ std::vector of nodes as the parameters. How would I turn a comma-seperated list of expressions into a C++ vector in the grammar?Second, how do you implement left-associative operators in a parser that does not allow left recursion?

And third, what would be the best internal representation of integers? A C++ int seems simplest, but limited. Using GMP seems more versatile, but I'm afraid it might seriously slow down the interpreter compared to C++ ints.

View 3 Replies View Related

Programming :: An Assignment: Writing A Bash Script

Oct 2, 2010

I have assignment to write bash script and I have to submit it after tommorow . I do not have experience to finish it by myself.I am really need help if any one can contact me. on my email I will be thanks him/ her.

View 14 Replies View Related

Programming :: C++: Assignment Operator Copy All The Members Also For Structures Containing STL Objects?

Sep 26, 2010

does the assignment operator copy all the members also for structures containing STL objects strings,vectors,vectors of vectors...)? I did try it on my platform,and it works that way (copying all the fields),but i was wondering if it is a standard behavior or not.

View 2 Replies View Related

Programming :: Memcpy Fails To Copy Data / But Byte By Byte Assignment Work

Jul 6, 2011

I got across a peculiar problem with memcpy.History:writing a code which do flash/Read functionality for SPI Parts.

Implementation:
1.memory map the Flash chip registers to userspace. - fine
2.Issue block read command
3.Just print the data I got, using the memory mapped address - fine I got the correct data.
4.Copy the data to a local buffer from memory mapped address using memcpy - FAIL

UPDATE:
on SUSE 11.3 -32 bit the above code worked perfectly, but on SUSE 11.4 - 64bit , Ubantu, Fedora it failed.
I am using gcc compiler obviously. I am using i386/x86_64 OS. Processor: Intel core 2 duo, SNB after step 4 , when I dump the data from local buffer every thing is FF.But step 4, if i implement byte by byte copy using assignment operator, it worked.is there any known bug with memcpy? am I missing anything?

View 7 Replies View Related

Software :: Installing Gccxml - Called Lvalue

Apr 12, 2010

I have problem installing gccxml something called lvalue. So what is lvalue and how can I fix the problem.
The error massage is as follows

[Code]....

and the gcc version is:gcc version 4.3.0 20080428 (Red Hat 4.3.0-8)

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

Red Hat :: Error: Operand Out Of Range (0x02000004 Is Not Between 0xfe000000 And 0x01ffffff)

Apr 1, 2010

I need to write a simple app that is huge in size (256 MB) but I can only got it up to 31 MB and got compiler error if I went greater than 32 MB. /tmp/cc7Ax35n.s:246: Error: operand out of range (0x02000004 is not between 0xfe000000 and 0x01ffffff).

I tried to change ulimit -l and -s options but it didn't help. Does anyone know why I got the compiler error and how to fix it? I am running RHEL 5.4.

[Code]...

View 1 Replies View Related

OpenSUSE Install :: Error: Operand Expected /dve/disk/by-label//

Apr 28, 2011

I just installed OS 11.4 this morning. Was previously on CentOS. I chose to have it import the partition & raid setup during install. Now when it boots it hangs with

"Could not find /dev/disk/by-label //" "Want me to fall back to /dev/disk/by_id/ata-ST(lots of drive stuff) -part2 (Y/n)" If I just hit ENTER at that point the boot will go on and it runs fine, but it stalls every time with that same error on boot. I did quite a bit of searching with Google and here (the search here considers every word in the error message to be too short or too common).

View 3 Replies View Related

General :: Renaming Files With Sed - Mv: Missing Destination File Operand After `$i'

Mar 20, 2011

Today i am trying to learn how to use sed. I set up a testing folder with the following files:

AAb.lol
AAc.lol
AAx.lol
test.sh

My goal is to create a script (test.sh) which renames all the files to their original name without AA. I want to end up with this:

b.lol
c.lol
x.lol
test.sh

sed seemed to be the perfect tool so i went ahead and created a script which i think should clear the job.

[Code].........

mv: missing destination file operand after `$i' From that 2nd line i can tell that $NewName is just empty. I also read something about sed needing the -e option for scripting purposes but i just don't understand it.

View 7 Replies View Related

Programming :: Have Several Scripts In /etc/rcS.d/ Directory Which Are Required To Run On Start Up

Sep 20, 2010

I have several scripts in /etc/rcS.d/ directory which are required to run on start up.Now I have written a new script, and I want it to be run during the system start up itself (Not in any runlevel). SoI have given the default start as,# Default Start :SBut when I use the command : "update-rc.d test_script.sh defaults".....it is creating symbolic links to/etc/rc0.d /etc/rc1.d ..../etc/rc6.d.But I actually need a symbolic link in the /etc/rcS.d/ directory.Is there is any way to achieve this ( I tried manullay creating a link in /etc/rcS.d, but that is not running the script on system start up).

View 1 Replies View Related

Programming :: Bash Script Critics Required?

Jan 16, 2011

As part of a package manager I am trying to build I am at the stage of checking if my system has the latest packages installed. To this end I would like some feedback on pieces that could be improved or perhaps alternatives that I can utilise. To the aficionados' of Perl, Python and the like, whilst I know these may be better suited to the task, the package manager is currently completely bash so I am trying to stay within this paradigm for the moment. I have edited this version slightly as it normally would tie in with the rest of my scripts which are not shown here. If there are any questions please ask and I will answer to the best of my ability:

[Code]...

View 7 Replies View Related

Slackware :: Error Message - Dirname - Missing Operand - When Starting Acroread

Aug 18, 2010

When I start acroread (and as far as I can tell it's only that program), I get the error message

But the program still starts, no problem. Happens with both

View 2 Replies View Related

Programming :: Automate The Password Prompt Required For Sudo Commands?

May 31, 2011

I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords

Code:

pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;

[code]....

I want the same function to be used , when it expects for sudo passwords for any of the below lines:

Code:

[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.

Code:

ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"

This is my script output

Quote:

[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x

[code]....

how to automate the password prompt required for sudo commands.

View 8 Replies View Related

Programming :: Fortan Error - Nonnegative Width Required In Format String At - 1

Jun 10, 2010

I'm in the process of debugging and compiling about sixty FORTRAN 95 programs and could use a little bit of your help before my brain is fried and fingers are cramped. Thanks for your time!

I receive the following errors:

Here is my code:

View 5 Replies View Related

Programming :: Convert A Colour Value From Hex (e.g. #FF8000) Into The Format Required By The Set_source_rgb Function?

Jul 4, 2010

I've recently starting dabbling with python and gtk/cairo bindings. Can anyone point me to a quick and easy way to convert a colour value from hex (e.g. #FF8000) into the format required by the set_source_rgb function?E.g. I have this:

Code:
cr=area.window.cairo_create()
cr.set_source_rgba(0.5,0.5,0,0.8)

[code]....

View 3 Replies View Related

Programming :: Get The Number Of Left-right-double Click?

Jan 20, 2011

can i get the ocuurance of left click-right click-double click?i need the time of ocurance and the click(left-right-double) that happend.any software?any clue..i need it in linux environment(kde or gnome)

View 14 Replies View Related

Programming :: Window That Appear At The Left Upper Corner, Which Command?

Jul 12, 2011

while writing script to send popup to another user i exposed to little window that appear at the left upper corner.i don't remember which command do it

View 2 Replies View Related

OpenSUSE Hardware :: Extend Desktop Left Instead Of Right - Background Application On The Screen To The Left?

Jun 28, 2011

I would like to use two monitors with my desktop, so connected them the other day and it worked straight away, which is good but... The monitor configuration app always want the primary monitor to be on the left hand side, thus it always extend my desktop right. Can I do anything to extend my desktop to the left instead of to the right so I can have background application on the screen to the left?

View 8 Replies View Related

Ubuntu :: Mouse Intermittently Double Left Clicks / When Single Left Click

Jun 15, 2011

I'm not sure if I should post this question in "hardware & laptops", or "Desktop Environments", because this is a hardware problem on a desktop computer.

Description of Problem:There is another thread that discussed this same problem that I'm having: However that thread is so old that the suggestions in it no longer work in Ubuntu 10.04 and for whatever reason I can not make a reply to that thread.As in the above thread, I've tried other input devices and rebooting the computer and using other USB ports, and my mouse still intermittently double left clicks randomly at times when I've only clicked the left mouse button once and at times and places when it should only produce a single click such as when selecting a drop down menu.

Has any one else had this problem, and does any one have any idea how to fix it or to trouble shoot this a bit more? Please let me know if there is any other information I can provide to further clarify or troubleshoot this issue.

View 2 Replies View Related

Programming :: Isatty - Terminal Emulators Don't Render Right To Left Languages Properly

Oct 13, 2010

I'm new to Linux and these forums, but programmed in C++ on other systems. I discovered several Linux terminal emulators don't render Right to Left languages properly and so as an exercise I writing my own. It based on GtkTextView widget. Basically is working, but the shell won't issue prompts because it doesn't think my terminal emulator is actually a terminal (isatty returns false)

View 3 Replies View Related

Programming :: Bash Script To Check How Much Free Space Is Left In /var Directory

Feb 24, 2011

I'm creating a bash script to check how much free space is left in /var directory then, if it hits a certain threshold, delete certain files with numbers for extensions (e.g. fileA.1, fileA.2 fileA.3, and fileA.4, fileB.1, fileB.2 fileB.3, and fileB.4 ). Here's a snippet from my script:

[Code]...

If I use a * as a wildcard for the number extension, the script fails. Maybe regex would work here, but I'm not particularly accomplished at it. Or some other construct.

View 18 Replies View Related

Programming :: Removing Left Recursion - Construct An AST From It By Executing A Piece Of Code For Every Nonterminal Matched?

Apr 7, 2011

I'm still a but confused about the standard way of removing it for left-associative operators: [URL] Especially about how to construct an AST from it by executing a peice of code for every nonterminal matched. And I'm still not totally convinced that it will be left-associative, I just barely understand it. Also, how would you remove left-recursion for something like this:

Code:
expr ::= expr "(" param_list ")"
| other stuff...?

View 8 Replies View Related

General :: Why Is NIC Not Taking A DHCP Assignment?

Oct 16, 2010

NIC is connected to a LINKSYS WRT54G running DHCP. There are plenty of available IP assignments. All other PC that I have connected to the LINKSYS work fine. The CAT 5 cable is fine.Why is this NIC not taking a DHCP assignment ?

View 14 Replies View Related

OpenSUSE Network :: Mounitng /dev/shm Stops IP Assignment On Boot?

Feb 13, 2011

I use static IPs in my network and IFup(traditional) this one is dual boot..when the boot sequence is at the point of assigning the Ip it counts down and fails. But after startup I can do a network restart and it assigns the IP properly. I am running 11.1 and also had this problem with 10.1. I am using /dev/shm mounted as a tmpfs as
the system seems to move a little faster this way and I recall reading that fglrx (ati proprietary driver) needs it. So here is the weird part If I do not mount /dev/shm it assigns the IP properly on boot....if I mount /dev/shm it will not. I just recently discovered this as with 10.1 I just lived with the problem...but on a dual boot machine it is really a pain. Does anyone have any clue where to look for the issue?? I have tried emptying shm and it of course does not matter as it is a ram device.

View 2 Replies View Related

Security :: IP Assignment To Authorized User Only Through DHCP Server?

Jan 15, 2010

I've a DHCP server in RHEL 5 and 100+ users in my network. I mapped 30 users MAC address with ip. Rest are getting ip address automatically. In my network, users tend to move from one department to another frequently. I've created scopes according to departments. (i.e. Dept A - 172.19.54.10-172.19.54.30 and so on for other departments).

1) I want to configure DHCP server in this way, that a client have to autheticated by DHCP server before receive and IP address.

2) Second, Whether DHCP server have free IPs in scope, but only clients can obtain IPs those MACs are mapped, rest should not without authentication or authorization.

View 2 Replies View Related

Networking :: Restrict Dhcp Assignment To A List Of Macs?

May 20, 2010

I have a lab with 1 switch and 2 machines attached. One XP station and a debian lenny server. My debian runs dhcpd with this configuration

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.31 192.168.1.254;
default-lease-time 345600;

[code]....

I'm trying to restrict dhcp to only provide setting for a list of MAC addresses (about 300 macs) Using the following option is not good to me because I have not a pattern in my clients mac.

class "private-hosts" {
match if substring (option hardware,1,11) = "01:00:50:56";
}

[code]....

I've try using iptables with following configuration, but XP still getting IP from dhcpd:

iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

[code]....

View 2 Replies View Related

Ubuntu :: System That Has University Assignment Doesn't Work

Mar 21, 2011

I'm currently in distress because my Ubuntu system that has my university assignment doesn't work. Not only that, when I tried to fix it I managed corrupt the dual boot I had and now cannot login into either Windows 7 or Ubuntu (besides the USB tryout version which I'm currently on now.I'll try and describe what happened in the beginning. I was rushing to get to class so I needed to shut down my Ubuntu system quickly. The quickest way was to obviously hold down the off button however later when I got home to finish off my uni assignment I couldn't boot into linux! I just get a dos command line with the word grub on it.However not only did it not fix my problem I now can't boot into anything except from this Ubuntu Live CD.

View 6 Replies View Related







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