Programming :: Error: Unexpected Array Reference At (1)

Sep 30, 2010

read(224,114)inum(i,j),jnum(i,j),dx(i,j),dy(i,j),h(i,j),
1
Error: Unexpected array reference at (1)

View 2 Replies


ADVERTISEMENT

Programming :: Bash Array Add Function Example Using Indirect Array Reference As Function Argument?

Jun 20, 2010

I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.

#!/bin/bash
addelementtoarray()
{
local arrayname=$1

[code]....

View 10 Replies View Related

Programming :: PHP MySQL Array Return Unexpected Data

Nov 8, 2010

I am trying to build an array with the column headers and the data like so:

PHP Code:
function query($query) {
$data = array();
$q = "$query";
$this->log->message("Manual query [$q], returning columns...");
$result = @mysqli_query($this->dbc, $q);
$this->selected_rows = mysqli_num_rows($result);

while($meta = mysqli_fetch_field($result)) {
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
echo "meta [{$meta->name}]"; $data[$meta->name][] = $row[$meta->name]; } }
echo "DATA ["; print_r($data); echo "] <br />";
return $data; }

So I can select the data from the array like so:
PHP Code:
echo $data[col_name][row_num];

However when I dump the array I dont get the data I am expecting:
Code:
running select * from users:
meta [company_name]meta [company_name]
DATA [Array ( [company_name] => Array ( [0] => My company [1] => My details ) ) ]

View 6 Replies View Related

Programming :: Memory Allocate In Function And Call It By Reference For Array Structure?

Jul 2, 2011

I am writing a function(in C language in Linux) to initialize an array of a structure from a mysql table by calling a function by reference but I have a problem with call this function by reference . this is my program:PHP Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

[code]...

View 4 Replies View Related

Software :: Bash - Indirect Array Reference To Array With Values Containing Spaces?

Jun 4, 2010

This _almost_ works. I just can't quite get it to honor the spaces.

Code:

#!/bin/bash
profiles=(
PROFILE_ONE
)
PROFILE_ONE=(setting1 "setting number 2")

[code].....

View 9 Replies View Related

Programming :: Parse Error: Syntax Error, Unexpected '@' In Php Code

Jun 14, 2011

Parse error: syntax error, unexpected '@' in C:xampphtdocsminippromail.php on line 8 .......its not recognizing the '@' symbol. heres the code im working with

<?php $receiver = myfriend@ourmail.co.in; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ourmail.co.in ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>

View 1 Replies View Related

Programming :: Undefined Reference Error When Using Lua API?

Jul 20, 2011

I wrote a small test program, and this is what happens when I try to compile it:

Code:
$ g++ -llua main.cpp
/tmp/ccHJ8HR3.o: In function `main':

[code]...

View 8 Replies View Related

Programming :: Undefined Reference To - Function Error

Nov 11, 2010

I have been trying to build a file called main.cpp through my make file which is in Linux.

There are functions like

Which are being called. I have included all the necessary headers and also have included the necessary lib.a files in the make file as below:


I am still getting the below error. I use make -j makefile.mak clean all command to make the build.

View 1 Replies View Related

Programming :: C Program - Undefined Reference Error ?

Jul 21, 2010

I'm building my main program on SUSE using C, but the compiler returns the error below.

Code:

Here's my code to which the errors are pointing to:

Code:

View 3 Replies View Related

Programming :: Getting Undefined Reference Error When Try To Install NOX

Jul 12, 2010

I am trying to install NOX which is a openflow controller and it needs Xerces-C++ this. I installed it successfully on the Debian. The output of the xerces after running the "make install" command is as follows which shows that is successfully installed on the machine.

[Code]....

View 17 Replies View Related

Programming :: Sed - Syntax Error Near Unexpected Token

Mar 9, 2011

#by executing bash file
#!/bin/sh
sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php

Output is:
line 4: syntax error near unexpected token `<'
line 4: 'sed -i 's/if (IEexec || domExec) document.write('<iframe id="IdMyIframe" '+IframePropriedades+'></iframe>');//g' *.php'

View 6 Replies View Related

Programming :: Syntax Error Near Unexpected Token

Jun 18, 2010

I'm fairly new to shell scripting and am having the hardest time figuring out why this simple script is giving me an error

The error is "syntax error near unexpected token `else'

I'm using TextEdit on OSX (sorry I'm limited to this). The only thing I can think of is that it's reading some return character and getting thrown off. I've tried saving the script using different encoding types but the same error pops up.

I also get an error at line 2 because it does not regonize as a command

View 5 Replies View Related

Programming :: Syntax Error Near Unexpected Token - Not Working ?

Jan 28, 2010

I got this script from website for inviting peoples to game and earning points easily ...but this seems not working and giving error..

View 4 Replies View Related

Programming :: YACC Syntax Error Unexpected Identifier

Feb 5, 2010

I was going through this Lex/YACC tutorial: [URL]... and I was working along with it. The Lex examples worked fine, but the YACC one quit white compiling

[Code]...

View 5 Replies View Related

Programming :: ./script.sh: Line 2 - Syntax Error Near Unexpected Token `('

Mar 11, 2010

Okay, first off I'm no hotshot programmer (and actually lack much familiarity with shell scripting) so apologies in advance if this problem is so trivial as to be irritating.

What I'm trying to do is drop the following command from either a shell script or a perl program. However, while it executes fine and does what it's supposed to when entered from the command line, I can't get it to work as a system call.

Here's the line:

Code:

When I drop it from a shell script like this:

Code:

I get the following:

Code:

If I try escaping the ()s with or ', I get this:

Code:

I've tried a bunch of other stuff to get it working (deleting the ()s, spacing them differently, etc) and looked around online for a solution, but I can't find anything that works.

I tried a shell script directly only after anything I tried to drop it from perl with `` or system() failed with the same errors.

View 3 Replies View Related

Programming :: Undefined Reference To 'main' Error In Crt1.o Function _start

Apr 13, 2011

I've having problems with my Makefile.

I'm trying to create a program from 2 files - main.cpp that contains the main function, and modules.c that contains the definitions of the functions that are called in main(). modules.c only contain function definitions, no main function.

My Makefile is as follows:

Code:

I have included "modules.h", which contains all the function declarations, in my main.cpp.

When I try to make using this Makefile, I get the error

Code:

If I switch the order of modules.o and main.o in my $(TARGET) line, then I get errors that say "undefined reference to" the functions I have defined in modules.c, in main.cpp.

View 4 Replies View Related

Programming :: Bash Script Giving Unexpected End Of File - Syntax Error

Apr 12, 2010

I have a bash script giving me the following error:

[Code]...

When I run it I am getting: ./svnup: line 61: syntax error: unexpected end of file Can't for the life of me figure out what is wrong. It's a script to export the latest revision from SVN to the web root folder and archive the previous version, basically.

View 4 Replies View Related

Programming :: Check If A Process Is Running - Syntax Error Near Unexpected Token `else'

Feb 10, 2011

I have an ubuntu 10.10 server and want to run a script on it to check if a process is running. If it is not running, it will start the process and also write into a log file.

When running the script i get the following error message:

syntax error near unexpected token `else'

Here is my script.

View 7 Replies View Related

Programming :: Run Small Shell Script - Bash - Syntax Error Near Unexpected Token `('

Jul 9, 2010

I was trying to run small shell script, but could not run. I got the error like in subject.

This is exact way i was trying to do.

View 6 Replies View Related

Programming :: Error - "syntax Error Near Unexpected Token Done"

Jul 23, 2011

I am a newbie in unix shell script programming . After I have tried to execute this code , I found the problem said that "syntax error near unexpected token done" . I don't know that where is the mistake in my code . Could anyone help me out this problem ?, PS* : I executed it in Redhat Enterprise Linux 4 and this is my code :

#!/bin/ksh
# Purge Script
# Input:
# 1. path (absolute path)
# 2. filename (does not apply to empty folder name)
# 3. retention policy (in day)

[Code]...

View 6 Replies View Related

Programming :: Typical Error "undefined Reference To Clock_gettime"

Oct 14, 2010

I am slowly getting accustomed with linux issues and its different programming compilation stuffs. and i must say am truly liking it. Now i am facing this typical error , "undefined reference to `clock_gettime'" while i am compiling a code, which is not mine as it required to install a simulator. Now i have read about this type for the last 2 days and i have included "-lrt" in the make file and included <time.h> in the header files which was missing but still i am getting that error.

Now matter how many times i run the make file with the required changes its still giving me this error, which i have comprehended as mainly linking problem rather than a compilation issue.

View 4 Replies View Related

Programming :: "Unresolved Reference" Error While Doing Dynamic Linking Of C++ (shared Object)

Apr 13, 2011

I am creating two shared libs that i intend to be dynamically linkable in C and C++, cross platform Linux/Windows/Mac. As a basic sketch, true for both libs, the lib code is in several .c/.cpp and .h files. For now, I'll talk about the part that I am actively working on, a lib named Discover, i.e. libdiscover.so.1.0. First, everything is in a namespace, RemKon_Discover.

The main Discover.cpp defines the methods for the Discover class (declared in Discover.h) and has extern "C' routines that can return pointers to my main c++ object. The call to GetLibraryMainPointer() creates a Discover class object, theMainObject (ok, I win a prize for dumb names) and returns the (non-mangled) pointer to the caller over in my test program. The Discover class itself is declared extern "c" and the tester program #includes "Discover.h".

In the test program, dlopen() correctly opens the lib and dlsym() gets the pointer to theMainObject. However, when I use that pointer in the tester program to access a method (aDiscoverObject->hello(), e.g.) I get compile time errors saying that Discover::hello() in an undefined reference. My makefile is attached.

[Code]....

View 10 Replies View Related

Programming :: Linker Error "undefined Reference" With G++

Jul 30, 2010

I am facing some problems when i am trying to link using g++. The linker error text is "undefined reference to `std::vector<std::string, std::allocator<std::string> >::end()'"

View 3 Replies View Related

Programming :: Php 5.3.3 HEREDOC Error "unexpected T_VARIABLE"

Oct 28, 2010

I am using php 5.3.3 with apache 2.2.16 on gentoo. While using HEREDOC inside php I get "PHP Parse error: syntax error, unexpected T_VARIABLE in /data/www/html/shaper/htb/htb.php on line 13". Whereas same script is working fine with php 5.2.13 and apache2.2.15. Below is the some line of code:

[Code]....

View 5 Replies View Related

Programming :: [C++] Error: Array Must Be Initialized With A Brace-enclosed Initializer

Jun 29, 2011

I'm implementing exceptions using longjmp() (since C++ exceptions don't offer the features that I need, including resuming and a "finally" block), like this:

Code:

jmp_buf ex_jmpbuf;
void *ex_exception;
bool ex_resumable;
jmp_buf ex_resumebuf;

[code]....

Why are the curly braces being misinterpreted as arrays here, but not anywhere else?

View 11 Replies View Related

Programming :: C Realloc Resize Array / Delete And Add Information Into The Array?

Mar 6, 2011

I am trying to dynamically delete and add information into the array "blah"

Code:
int blahsize = 1;
char** blah = (char**) calloc(blahsize+1,sizeof(char*));
Adding information:
Code:
blah[1]=stuff1;
blah[2]=stuff2;
code....

View 2 Replies View Related

Programming :: Convert Short Array To Char Array?

Jun 7, 2010

I have trouble converting a short array to a char array

Code:

short pShort[4] = { 0x41, 0x42, 0x43, 0x44 };

How to convert this to a char array?

View 4 Replies View Related

Programming :: Converting A PHP Array Into An HTML Array?

Aug 9, 2009

I'm writing a PHP program. I've encountered a problem; in the following code I try to pass $_POST['delete'] which is an array as the value of a hidden input to some form, but it doesn't do so.there's something wrong with converting PHP array into HTML array. I'm sure that $_POST['delete'] is not null and is a real array.

echo '<input type="hidden" name="delete[]" value="'.$_POST['delete'].'" />';

View 4 Replies View Related

Ubuntu :: Create New Directory But Keep Getting Same Error - Bash: Syntax Error Near Unexpected Token `newline'

Jan 13, 2010

I'm trying to create a new directory using the mkdir command.

Code:

home@ubuntu:~$ mkdir <aicoursework>
bash: syntax error near unexpected token `newline'

that's the error that i keep getting, what am i doing wrong?

View 5 Replies View Related

General :: Error - Gzip :stdin:input /output Error /bin /gstar :unexpected EOF In Archive

Mar 28, 2011

when iam opening my dec_backup folder the folling error is appering :

the error is gzip :stdin:input /output error
/bin /gstar :unexpected EOF in archive
/bin /gstar: error is not recoverable :exesting now

View 1 Replies View Related







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