Questions tagged [subscript]

A subscript is a number, figure, symbol, or indicator that is smaller than the normal line of type and is set slightly below the baseline.

Subscripts are common in mathematical notation (generally indicating position, such as the index of a variable in a vector) and chemistry formulas (e.g. H2O).

Subscript and superscript (Wikipedia)

625 questions
-1
votes
3 answers

Incorrect output from overloaded [] function

The spec says that the function must return the row of the matrix specified by the "row number" in [] Class Definition: class Matrix { public: //functions taken out private: double ** matrix; // the matrix array unsigned rows; // # rows …
Jaydie
  • 25
  • 1
  • 4
-1
votes
1 answer

c++ overloading subscript dereference where nullptr is allowed

Hi I'm a student developing various abstract data types for learning purposes. I am trying to overload the subscript operator to look up the keys in these ADT's. I cannot avoid the case where my code inserts missing keys. It is intended that when…
clns
  • 1
-1
votes
2 answers

Cannot subscript a value of type '[UIImage]' with an index of type '()'

I have been recieving this error: cannot subscript a value of type '[UIImage]' with an index of type '()' Here is my code: let images: [UIImage] = [ UIImage(named: "profilePicture.jpg")!, UIImage(named: "back3.jpg")!, UIImage(named:…
Rohan Vasishth
  • 241
  • 1
  • 6
  • 14
-1
votes
1 answer

Ambiguous use of 'subscript' Swift 3 compile error

Currently getting the error "Ambiguous use of 'subscript'" when only building on a real iPhone. Not having any problems when using the simulator. Here is my code: let url=URL(string:myUrl) do { let allContactsData = try…
Sondre Brekke
  • 11
  • 1
  • 2
-1
votes
2 answers

VBA Runtime Error 9 - Subscript out of range

I am attempting to create a user form that will propagate the first available row of the excel sheet with information. I am struggling to get the range correct, and the form is currently showing 'Subscript out of range' ; 'Runtime error 9'. There…
-1
votes
2 answers

Cannot Subscript a value of type CNLabeledValue with an index of type CNLabeledValue

In the new contacts framework, I am trying to add social profiles and I am using a line of code that works in other projects, but for some reason it just does not work in the particular one that I am working in. Here is the code below let…
-1
votes
1 answer

R Error in reslist$subjects[[1]] : subscript out of bounds

I want to acquire the ranking score of some movies, and not knowing how to fix the problem with "subscript out of bounds". Here is my code. movieScoreapi <- function(x) { api <- "https://api.douban.com/v2/movie/search?q={" url <- paste(api, x, "}",…
victordongy
  • 325
  • 2
  • 4
  • 13
-1
votes
1 answer

SDL vector subscript out of range

I'm getting a 'vector subscript out of range' error. I know this is caused by an indexing issue where the index is larger than the maximum size of the array/collection. However, I can't figure out why it's getting to that stage, as I am only ever…
ninja
  • 11
  • 2
-1
votes
1 answer

Extracting elements from List in R

I am a beginner in R. So I am experimenting with lists to understand R. x <- list(foo = 1:4, bar = 0.6) I am able to get the foo variable from x with y = x[1]. x and y both are lists and I can get the first element from x with x[1] but it is not…
Avog
  • 139
  • 17
-1
votes
1 answer

How to solve ambiguous use of subscript error

When I run my app on a simulator or my phone the code compiles fine but when I go to archive it (to upload to the App Store) I get the "ambiguous use of subscript" error. Int((results?.valueForKey("schoolYear")[0])! as! Int) How can I fix this?
Schuey999
  • 4,706
  • 7
  • 21
  • 36
-1
votes
1 answer

How i make Column in Parse with Swift

I started learning programing just few weeks ago. i am making some application with Swift and Parse i have problem i install Parse SDK and Frameworks then i tried connect my app to Parse. (connecting was successful) but In test the SDK has some…
TaeWoo Park
  • 1
  • 1
  • 3
-1
votes
2 answers

Why am I getting the error [NSObject : AnyObject]?' does not have a member named 'subscript'

In my removeTextFieldObserver function below, I’m getting an error "[NSObject : AnyObject]?' does not have a member named ‘subscript’”. If it’s a dictionary surely it should have a subscript? func showSimpleAlert() { let title =…
asheesh Verma
  • 404
  • 6
  • 17
-1
votes
1 answer

OpenCV / Visual C++ : Vector Subscript Out of Range

When I run the following code, error occurs saying VECTOR SUBSCRIPT OUT OF RANGE. I get the error when calling boundingRect. Debugger says "Vector subscript out of Range" when I print the vector contours, it has zero size. I can't figure it out. I…
DDD3
  • 5
  • 6
-1
votes
1 answer

Swift like array class behavior with subscript

I did implement class which use subscript and return objects like following: class PlacesSet { ... subscript(i: Int) -> Place { get { return stored[i]; } set { stored[i] = newValue; } } } But when I…
famer
  • 469
  • 1
  • 5
  • 14
-1
votes
1 answer

Excel 2010: Subscript out of range error

The error that I am receiving is Run-time error '9': Subscript out of range. Sub Workbook_Open() 'Turn off any alerts that maybe displayed. Application.DisplayAlerts = False 'Turn of the screen updates Application.ScreenUpdating = False 'Declare…
DJenkins
  • 31
  • 1
  • 1
  • 6