I'm having a lot of issues wring codes in C++ specialy when 3 files are required (.h, .cpp and main.cpp). Very different to C that it was very easy for me but not now with C++. I nee to write a program to do the following: Create 3 files for this program. Taxpayer.h, Taxpayer.cpp, and main.cpp Create a class called Taxpayer. Data members (private variables)include a social security number, a full name, a yearly gross income, and the tax owed. Your class should have a constructor that takes in a name, social security number, and a yearly gross income. Provide …

Member Avatar
Member Avatar
+0 forum 1

How can I make the URL displayed in the MessageBox clickable, such that when a user clicks on it, it will open the link in a web browser? string msg = "MyApp | v1.0.0.0.1" + Environment.NewLine + "© 2016 MyApp" + Environment.NewLine + "All Rights Reserved." + Environment.NewLine + "For more information, visit: http://www.mysitename.com/myapp"; MessageBox.Show(msg); I want it to look similar to this screenshot below. [Screenshot of Speecy's About MessageBox](http://i.stack.imgur.com/gCHhq.png)

Member Avatar
Member Avatar
+0 forum 2

I am trying to learn objective C with my brother and I have stumbled onto a problem involving one trying to collect a user's input and checking if it is odd or even. I made this, and this works to test if a number is even or odd: #include <stdio.h> int main(){ int num = 22; if (num % 2 == 0) { printf("Yep. "); } else { printf("Nope. "); } } But how do i get it so that I can take what a user input is and run it to see if it is even or odd? This …

Member Avatar
Member Avatar
+0 forum 2

IS IT BETTER TO MOVE TO SWIFT OR STAY WITH OBJECTIVE-C?

Member Avatar
Member Avatar
+0 forum 2

I have a Health based .Net (C#) project that needs to import a huge chunk of medical records from an old database that were used in a different application. The database has been successfully migrated to the version compatible with our application. The problem is the contents in one of its table. It contains binary data, that we have concluded so far is in a 'compressed' form. The compression method used is an algorithm found here: Simple Compression Zip - https://sourceforge.net/projects/scz-compress/ #include "scz_compress_lib.c" // Scz_Compress_File(in,out) #include "scz_decompress_lib.c" // Scz_Decompress_File(in,out) We're trying to find a way to be able to call …

Member Avatar
Member Avatar
+0 forum 1

Given a typed List collection of int values named dueDays that has already been sorted, write the code to retrieve the index of the element with the value 30 and store the result in an int variable named dayIndex. Given a typed List collection of int values named dueDays that has already been sorted, write the code to retrieve the index of the element with the value 30 and store the result in an int variable named dayIndex. Given a typed List collection of int values named dueDays that has already been sorted, write the code to retrieve the index …

Member Avatar
Member Avatar
+0 forum 2

i have these code for get image pixel data: typedef std::vector<BYTE> pixeldata; pixeldata GetImagePixel(HDC hdcImage) { BITMAP bmp = {0}; BITMAPINFO Info = {0}; memset( &bmp, 0, sizeof(BITMAP) ); HBITMAP hBitmap =(HBITMAP) GetCurrentObject(hdcImage, OBJ_BITMAP); GetObject(hBitmap, sizeof(BITMAP), &bmp); BITMAPINFO info { }; info.bmiHeader.biSize = sizeof(info.bmiHeader); info.bmiHeader.biWidth = bmp.bmWidth; // pay attention to the sign, you most likely want a // top-down pixel array as it's easier to use info.bmiHeader.biHeight = -bmp.bmHeight; info.bmiHeader.biPlanes = 1; info.bmiHeader.biBitCount = 32; info.bmiHeader.biCompression = BI_RGB; // the following calculations work for 16/24/32 bits bitmaps // but assume a byte pixel array size_t pixelSize = info.bmiHeader.biBitCount / …

Member Avatar
Member Avatar
+0 forum 1

[Click Here](http://i.imgur.com/ka0Pnnr.jpg) I have a app having multiple Xib files calling in one main Xib and its class. I have added expand and collapse view which works on particular xib expand and collapse subviews as required and reduces/Expands Height too. This works well for one xib section when all tab of xib files are collapsed and second xib wont changes it y-Coordinates, but I'm having a white space between. I want to fix it. Note: Every xib contains a class refer to it. The whole app wont uses auto-resize. Please help me solve this

Member Avatar
+0 forum 0

I have high hopes for the Swift programming language, the presentation showed a lot of potentials for this language in apple keynote, just a question do you guys think swift will come to windows in an IDK soon?

Member Avatar
Member Avatar
+0 forum 6

Ever since I got a fancy iMac and started using the Xcode IDE, I got hooked on Apple's new Swift language. From what I heard, it is supposed to replace the aging Objective C. I left a couple of Swift code snippets in the Computer Science section about my one-month experience with Swift. I think Apple is onto a great thing. They want to make Swift Open Source by year's end. See ... https://www.daniweb.com/software-development/computer-science/code/496606/a-taste-of-swift-part-1 On the side: Looks like the Objective-C Discussion Community is dying.

Member Avatar
Member Avatar
+1 forum 5

Everytime I link a `webview` into my OS X project, it always brings up `Use of undeclared type 'WebView'`. How am I supposed to fix this? I've tried linking the WebKit framework and things like that, but they never worked.

Member Avatar
Member Avatar
+0 forum 2

Assalam o alikum my name is Al-Haya Noor and i am using very first time the forum. is there any one who guide me? i have a problem while doing my project. in Embedded-C and the problem is Consider the following sequence of values: 00000000 00000000 00000001 00000000 00000000 00000100 00000000 00000000 00010000 00000000 00000000 01000000 00000000 00000001 00000000 00000000 00000100 00000000 00000000 00010000 00000000 00000000 01000000 00000000 00000001 00000000 00000000 00000100 00000000 00000000 00010000 00000000 00000000 01000000 00000000 00000000 Using a “Super Loop” architecture, and a „loop‟ delay, write software that will generate this sequence of bytes on Port …

Member Avatar
Member Avatar
+0 forum 2

this is my background http://s13.postimg.org/6zejiqc87/1429994667798.png in current code user can move sprite to any location, but I want the user to only move sprite to specific location. I have one Sprite (s1) I want to move it to specific position as you can see my background have line and dots and these dots are the position I want the user to be able to move the sprite from 1 to 2 and then from 2 to 3 but they can't skip one position for example they can't move sprite from 1 to 3 or from 2 to 4 I don't …

Member Avatar
+0 forum 0

I want to calculate user steps(like pedometer).I know that with iPhone 5s, 6 and 6+ we can use `CMStepcount` or `CMPedometer` or class(which use M7 chip of devices) but iPhone 5 and lower versions does not support M7 chip, so we can't use `CoreMotion`. By searching all over internet i came to know that we can use accelerometer sensor for this purpose. But after spending a lot of time still i'm not able to make an accurate algorithm that works. If anybody worked for this kind of algo can you please share their knowledge or atleast give link of good …

Member Avatar
Member Avatar
+0 forum 1

Recently I am facing too much issues in making the apple accept my app because of inapp purchases download failures. Is it possible that I submit a version which will fetch the inapp purchases ID's from my own server and than fetch the inapp purchases details from the apple. I want this whole system to be dynamic, I submit the inapp purchase and than update my server and than when the inapp purchase is approved it will automatically display in my app. Currently I have three version of my app approved and still apple rejects my new version each and …

Member Avatar
+0 forum 0

I'm trying to create simple game on xcode (swift) what I'm trying to do is moving player pieces from their positions how can I implement moving pieces from [number]positions to [number]positions for example from positions 1 to either 2 or 0 otherwise it get back to the previous positions more details so this is my game filed A & B represent player pieces (like in chess) each player have 3 pieces and I placed image view on each of these black point if player place one piece in position 1 in the next round they can move their piece from …

Member Avatar
+0 forum 0

Can anyone help me? I have created a dictionary with the contents of a plist(data.plist) file but now I cannot figure out how to search and display the contents. I have searched online for days and cannot get a resolution. Most tutorials show a pre-defined array being used but if I change it to my plist it crashes. Any help would be greatly appreciated. I posted my code below here. // // ViewController.h // Search // // #import <UIKit/UIKit.h> @interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UISearchDisplayDelegate> @end Here is my .m file as well. // // ViewController.m // Search // …

Member Avatar
Member Avatar
+0 forum 1

Can anyone help me? I have created a dictionary with the contents of a plist(data.plist) file but now I cannot figure out how to search and display the contents. I have searched online for days and cannot get a resolution. Most tutorials show a pre-defined array being used but if I change it to my plist it crashes. Any help would be greatly appreciated.

Member Avatar
Member Avatar
+0 forum 4

Hello. I am getting into app development and started with a calculator. The input is not equal to the output in any size I set. Here are some screenshots: Input: [Screenshot](https://www.dropbox.com/s/otncvnpfotfgetu/Screenshot%202015-02-05%2014.44.43.png?dl=0) Output: [Screenshot](https://www.dropbox.com/s/360u5iastr69hgq/Screenshot%202015-02-05%2014.45.11.png?dl=0) And finally, here is the size thing: [Screenshot](https://www.dropbox.com/s/23aln2fzovpv72y/Screenshot%202015-02-05%2014.46.00.png?dl=0).

Member Avatar
Member Avatar
+0 forum 6

I am currently writing an iOS application which fills Dynamic cells with data retrieved from a PLIST file. I have searched and searched but cannot comprehend/find a way to make my data searchable. I would like my plist to be searchable and provide the correct information. Any assistance would be greatly appreciated as I am new and struggling with the search function. I am coding with Xcode 6.1.1 and for iOS 7+. If you would like I can also post my code so you can see what I am working with.

Member Avatar
Member Avatar
+0 forum 4

How can i start programming in objective c? I am aware with c#.

Member Avatar
Member Avatar
+0 forum 6

I expected there to be one, especially on a site as popular as this one.

Member Avatar
Member Avatar
+0 forum 2

Here's my understanding fetching the input: int num = 0; NSLog (@"Input 5 numbers"); scanf("%d", &num); NSLog (@"\n You inputted: %d !", num); Sample Input: 54321 Output: 54321 But the output should be: 5 4 3 2 1

Member Avatar
Member Avatar
+0 forum 1

I am creating a contact program with python and wxpython. While creating the browsing function for my program I ran into a problem. I've been searching for hours trying to find a way to fix it. Unfortunately I haven't had any luck on fixing the error/problem. Here is the code that is giving me trouble/errors: def BrowseDB(self): connection = sqlite3.connect('*databasefile*.db') cur = connection.cursor() rows = cur.execute("SELECT FirstName, LastName, Homephone, Cellphone, Email, BusinessName, Address, City, State, Zipcode FROM contacts") for row in rows: print row index = self.contactList.InsertStringItem(sys.maxint, str(row[0])) self.contactList.SetStringItem(index, 1, row[1]) self.contactList.SetStringItem(index, 2, row[2]) self.contactList.SetStringItem(index, 3, row[3]) self.contactList.SetStringItem(index, 4, row[4]) …

Member Avatar
+0 forum 0

dear daniweb friends, i really need help. i want to parse a json from a file inside folder. that folder inside xcodeproj (not from URL). i use this code: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ /*NSData* kivaData = [NSData dataWithContentsOfURL: [NSURL URLWithString:@"http://json.comli.com/reportTextEn.json"] ];*/ NSString *filePath = [[NSBundle mainBundle] pathForResource:@"reportTextEn" ofType:@"json"]; NSError *error = nil; NSData *kivaData = [NSData dataWithContentsOfFile:filePath options:NSDataReadingMappedIfSafe error:&error]; NSDictionary* json = nil; if (kivaData) { json = [NSJSONSerialization JSONObjectWithData:kivaData options:kNilOptions error:nil]; } dispatch_async(dispatch_get_main_queue(), ^{ [self updateUIWithDictionary: json]; }); }); -(void)updateUIWithDictionary:(NSDictionary*)json { @try { label1.font = [UIFont fontWithName:@"Arial-BoldMT" size:8]; label1.text = [NSString stringWithFormat: @" %@", json[@"halaman1"][@"dataTertanggung"], nil]; label2.font = [UIFont fontWithName:@"Arial-BoldMT" …

Member Avatar
+0 forum 0

I developed a 3d cube consist of 6 layer side by side to form a cube type structure. I am getting the layer info on click using touch event. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if ([touches count] == 1) { for (UITouch *touch in touches) { CALayer *layer = [(CALayer *)self.layer.presentationLayer hitTest:point]; layer = layer.modelLayer; if([[layer valueForKey: @"isClicked"] isEqualToString:@"btnClicked"]) { if([[layer valueForKey: @"diceFace"] isEqualToString:@"face1"]) { // i want to open new view..... } } } What i want is to open a new view controller on clicking any side of the cube in a layer. How can i do this …

Member Avatar
Member Avatar
+0 forum 1

im new in objective c.i have come out with the getter and setter but not sure is correct or not. .h #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property(nonatomic, retain) NSString *myText; @property(nonatomic, copy) NSNumber *opacity; @property(nonatomic, assign) id delegate; @end .m #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize myText; @synthesize opacity; @synthesize delegate; //getter -(NSString*)myText{ return myText; } -(NSNumber*)opacity{ return opacity; } -(id)delegate{ return delegate; } //setter -(void)setMyText:(NSString *)_myText{ if(myText!=_myText){ [myText release]; myText=[_myText retain]; } } -(void)setOpacity:(NSNumber *)_opacity{ if (opacity!=_opacity) { [opacity release]; opacity=[_opacity copy]; } } -(void)setDelegate:(id)_delegate{ delegate=_delegate; } - (void)viewDidLoad { [super viewDidLoad]; // Do any …

Member Avatar
+0 forum 0

I Have an NSButton and Im trying to get it to display the barber stripes sideways when the button is pressed. I can't redraw the NSRect, and was wondering if you had any clues on implementation?

Member Avatar
+0 forum 0

Hi i need help to solve this issue: refresh the first controller, UITableview and navigation bar for changing bg colors the color are set and it works i need only to refresh the app for update the app with the new colors i change the colors of my app clicking a button so when i click this button there's this code -(void)changestyle { change=true; [self initWithNibName:nil bundle:nil]; } and all the bg color are set this way (this is navigation bar set in app delegate) (the array are ok i need only a way to refresh the first uitableview and …

Member Avatar
+0 forum 0

Hi i've done an app and tested even on iphone 4s/5/ 6 in xcode 6 and it works on simulator if i test on a iphone 4s device ios 7.1 and 8 the scrolling doesnt't work on any pages and there is a static page that seems covered and i can read the text and see the image it's very strange i don't know what it is, i can't submit if it doesn't work on the devices is it a cache problem ? i delete the cache by deleting the app and the press home button and on button at …

Member Avatar
+0 forum 0

The End.