Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Compound/Complex C-String in Xcode/Cocoa -


i creating sqlite3 program. creating database within code. have 15 columns. example below:

nsstring *createsql = "create table if not exists fields (date text primary key,                    name text,           /*column #1 */                    class text,          /*column #2 */                    ...                    completed text);";  /*column #15 */ 

when compile getting "missing terminating character error. did research , saw because c-string process cr\lf continuation character. don't want create line of codes scrolls right margin of screen every time need sql. there way can create string can broken on separate lines without getting error?

two things:

  1. you need @ character before string begins. nsstring literals @"look this".

  2. your string split on multiple lines, confusing compiler (this error you're seeing). need have entirely on 1 line. if want split this, wrap each line in quotes, this:

_

nsstring * foo = @"foo "                   "bar "                   "baz"; 

or barry says here , use trailing backslash @ end of each line indicate continuation.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -