C Error C2109
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn subscript requires array or pointer type visual c++ more about Stack Overflow the company Business Learn more about hiring developers or expression must have pointer-to-object type posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community c++ declare array Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error C2109: subscript requires array or pointer type up vote 0 down vote favorite I am trying to debug some homework but I am having trouble with these lines of code #include "stdafx.h" #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error C2109: subscript requires array or pointer type up vote 2 down vote favorite #include
Programming Boards C Programming Error C2109: subscript requires array or pointer type Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get http://cboard.cprogramming.com/c-programming/28244-error-c2109-subscript-requires-array-pointer-type.html a compiler | Fixes for common problems Thread: Error C2109: subscript requires array or pointer type Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch https://github.com/charlesw/tesseract-vs2012/issues/1 to Threaded Mode 11-09-2002 #1 Rafiki View Profile View Forum Posts Registered User Join Date Nov 2002 Posts 9 Error C2109: subscript requires array or pointer type I am very new to C programming so this c error may be a silly question. I am recieving the following error and don't know why: error C2109: subscript requires array or pointer type The code that it is pointing to are these three lines: tempFahr = fahr[indexOfMinFahr]; fahr[indexOfMinFahr] = fahr[fillFahr]; fahr[fillFahr] = tempFahr; Any suggestions? Thanks 11-09-2002 #2 Prelude View Profile View Forum Posts Visit Homepage Code Goddess Join Date Sep 2001 Posts 9,879 Is fahr an array? Can we see the c error c2109 declaration? -Prelude My best code is written with the delete key. 11-09-2002 #3 moi View Profile View Forum Posts Registered User Join Date Jul 2002 Posts 946 the error message is composed of quite clearly-spoken english. in order to use subscrpiting, you must be operating on an array or a pointer. fahr is neither of these. hello, internet! 11-09-2002 #4 Rafiki View Profile View Forum Posts Registered User Join Date Nov 2002 Posts 9 Here are the declarations: double fahr[20]; double tempFahr; double indexOfMinFahr; double fillFahr; 11-09-2002 #5 moi View Profile View Forum Posts Registered User Join Date Jul 2002 Posts 946 Originally posted by Rafiki Here are the declarations: double fahr[20]; double tempFahr; double indexOfMinFahr; double fillFahr; the index of the subscript has to be of an integral type hello, internet! Quick Navigation C Programming Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums General Programming Boards C++ Programming C Programming C# Programming Game Programming Networking/Device Communication FAQ Board Programming Book and Product Reviews Platform Specific Boards Windows Programming Linux Programming Cprogramming.com and AIHorizon.com's Artificial Intelligence Boards General AI Programming Community Boards Article Discussions Tech Board General Discussions A Brief History of Cprogramming.com Contests Board Projects and Job Recruitment « Previous Thread | Next Thread » Popular pages E
Support Search GitHub This repository Watch 12 Star 23 Fork 67 charlesw/tesseract-vs2012 forked from jakesays/tesseract-vs2012 Code Issues 10 Pull requests 2 Projects 0 Pulse Graphs New issue Build error: C2109 #1 Open steve-morries opened this Issue Mar 2, 2014 · 8 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants steve-morries commented Mar 2, 2014 Version: both current (Mar 2, 2014) and tesseract-vs2012-1.70 When executing "msbuild.exe build.proj" using Visual Studio 2013, I encounter the following errors: src\pngread.c(109): error C2065: 'png_libpng_ver' : undeclared identifier [tesseract-vs2012-1.70\libpng\libpng.vcxproj] src\pngread.c(109): error C2109: subscript requires array or pointer type [tesseract-vs2012-1.70\libpng\libpng.vcxproj] src\pngread.c(111): error C2065: 'png_libpng_ver' : undeclared identifier [tesseract-vs2012-1.70\libpng\libpng.vcxproj] src\pngread.c(111): error C2109: subscript requires array or pointer type [tesseract-vs2012-1.70\libpng\libpng.vcxproj] ... It seems that version information is missing. Owner charlesw commented Mar 3, 2014 I just built the current version and it worked fine here unfortunately. When you say you executed "msbuild.exe build.proj" using Visual Studio 2013 do you mean the VS command prompt (e.g. "Developer Command Prompt for VS2013")? Also might be worth directly opening the sln in VS 2013 and seeing if you get the same errors. steve-morries commented Mar 3, 2014 Charles, thanks for getting back to me. Yes, I am using the "Developer Command Prompt for VS2013". I cloned the repository and run "msbuild build.proj" and got the same error. Is there any environment variable need to be set? C:\Program Files (x86)\Microsoft Visual Studio 12.0>c: C:\Program Files (x86)\Microsoft Visual Studio 12.0>cd C:\tesseract-vs2012 C:\tesseract-vs2012>msbuild build.proj Microsoft (R) Build Engine version 12.0.30110.0 [Microsoft .NET Framework, version 4.0.30319.34011] Copyright (C) Microsoft Corporation. All rights reserved. Build started 3/3/2014 12:19:31 PM. Project "C:\tesseract-vs2012\build.proj" on node 1 (default targets). Project "C:\tesseract-vs2012\build.proj" (1) is building "C:\tesseract-vs2012\Tesseract.sln" (2) on node 1 (Build target(s)). ValidateSolutionConfiguration: Building solution configuration "DLL_Debug|Win32". Project "C:\tesseract-vs2012\Tesseract.sln" (2) is building "C:\tesseract-vs2012\liblept\leptonica.vcxproj.metaproj" (3) on node 1 (default targets). Project "C:\tesseract-vs2012\liblep