Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
72% Quality Score
Upvotes Received
9
Posts with Upvotes
7
Upvoting Members
8
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
4 Commented Posts
~25.5K People Reached
Favorite Tags

62 Posted Topics

Member Avatar for nathaliecolemadrigal.lopez
Member Avatar for tegaelam

[QUOTE=tegaelam;1399200]Hi Gerard 4143, Thanks for responding, I'm still lost. It's my assumption that my line 26 that starts with for(int b=1..etc) is going to be the lets say "action line" for lack of a better word right now. I did a revision to my program from what I though you …

Member Avatar for Reverend Jim
0
3K
Member Avatar for marcelmarcelmarcelmarcelmarcelmarcelmarcelmarcel

Couple of things to note: 1. In your list constructor you need to link your head and tail, or the attributes are completely meaningless 2. When you add an element you need to link the head/tail node to the new node. Also code that appear in both the if and …

Member Avatar for David W
0
2K
Member Avatar for harde_1

Part c is asking you to make an initializer with the calss. ie. [NSString string] (which is equivalent to [[NSString alloc]init]autorelease]). It's testing your ability to create class functions.

Member Avatar for geojia
0
169
Member Avatar for shrikanthnk

In didFinishLaunchingApplication you need to set your custom VC to the mainWindow's VC. You are not just not getting the tableView. You are not getting any view.

Member Avatar for geojia
0
291
Member Avatar for Harvey_10

@properties are instance variables with predefined getters and setters. When you define a property ie: `@property (nonatomic, strong)NSString *coffee;` xCode actually creates couple of things: 1. a instance variable `_coffee` 2. a getter for the instance variable - (NSString *)coffee{ return _coffee } 3. a setter for the instance variable …

Member Avatar for ChrisPadgham
0
181
Member Avatar for android45

There are certain situiations where message call are perferred over dot notation. When using custom getters (same for setters) [obj getPropertyA] is more usefull than obj.propertyA because the formor is searchable. While you can search for "propertyA", you would find both getters and setters.

Member Avatar for mptheapple11
0
200
Member Avatar for MareoRaft

Also %@ is for pointers. Which means any class that implements `- (NSString *)description` will have a meaningful output.

Member Avatar for geojia
0
166
Member Avatar for MareoRaft

Not to be overly picky but count is not a class method. `NSMutableArray *mArray = [NSMutableArray array];` `NSNumber *mArraySize = [NSNumber numberWithInt:[mArray count]]; //or mArray.count also returns the int`

Member Avatar for geojia
0
321
Member Avatar for k3na26

It would help to know what kind of errors you are getting and what methods actually work

Member Avatar for satabios
0
3K
Member Avatar for rena0514

Do you realize that in your main() you never actually call your A(int int)? that's why you are getting 0,0.

Member Avatar for guly2010
0
4K
Member Avatar for Akira01
Member Avatar for angelineang

Not an expert: but instead of checking for equivalence why not check for difference less than some val (1e-8)?

Member Avatar for geojia
0
134
Member Avatar for geojia

Hi gurus, this is a homework assignment on finding all closest pairs. I used a quad tree for my algorithm and its running time is compared to the naive algorithm. (I didn't use the java quad tree because I didn't know it existed...) My problem right now is that after …

Member Avatar for rubberman
0
218
Member Avatar for ladybro

You can initialize your array to contain -1's and then just ignore them when you are reading the cards, or you can use ArrayList which is a mutable array.

Member Avatar for stultuske
0
155
Member Avatar for geojia

I've been trying to code a link list in c and though it seems fairly straight forward I'm getting strange output. My link list nodes: [CODE] struct OBJECT { int Status; struct OBJECT *P_LINK; struct OBJECT *N_LINK; struct VALUE *P_VALUE; }; [/CODE] Link list [CODE] struct llist { struct OBJECT …

Member Avatar for nezachem
0
108
Member Avatar for rbjq

This forum provide a very comprehensive intro to big-O notation: [url]http://www.daniweb.com/software-development/computer-science/threads/324685[/url] and when you analyze programs in T(n) = 4^(n-1)]/ 3 + O(n) it's called Taylor notation. Here are a list of lectures that will help you: [url]http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/[/url]

Member Avatar for Rashakil Fol
0
151
Member Avatar for pandaEater

In big-O notation constants doesn't matter. So is a program that makes 10 calls n times is O(n) such that if n=1 runtime =10 n=2 runtime = 10*(2) ... n=infinity runtime =10(infinity) //here 10 doesn't matter in the sense of big-O notation Also big-O notation assumes any constant multiplier so …

Member Avatar for Rashakil Fol
0
202
Member Avatar for Kashh
Member Avatar for atticusr5

In addition to csurfer's points, if the code compiles and runs but return the same un-sorted array you need to check how the quicksort() is called. Specifically the *& which is a reference/de-reference. Make sure the array is passed in as a pointer.

Member Avatar for geojia
0
151
Member Avatar for elsiekins

why does it have to be an array? Having a size 0 array is really pointless since it'll always be size 0 since arrays are statically initiated. If you make a vector, then you can change the size dynamically and add objects later when you need. [CODE] vector <objType> arr; …

Member Avatar for elsiekins
0
421
Member Avatar for Me-Mo

have anyy of yyou considered that the original poster has OCD? Everyy time I tyype "yy" I have to tyype it twice. Everyytime. Mayybe the poster's got a "l" problem?

Member Avatar for Tellalca
-3
149
Member Avatar for iamthesgt

p[c] is a memory address. What you want is the value of p at c. Try *p[c]=what you need.

Member Avatar for iamthesgt
0
188
Member Avatar for hystaspes
Member Avatar for darylsanderson9

what's your problem? specifically which line is your code acting strange or crashing?

Member Avatar for darylsanderson9
0
253
Member Avatar for Aaron26
Member Avatar for gizmo7008

[CODE] const int MAX_NAMES = 8; int nStudents = 0; Student student[MAX_NAMES]; [/CODE] you set MAX_NAMES to 8 and used it to make an array of size 8. Arrays are static, you can't change its size after you initialize it. If you want it to be dynamic look at david's …

Member Avatar for gizmo7008
0
114
Member Avatar for 000033858

How would you like that packaged, and I can also submit it for you if it pleases you.

Member Avatar for jon.kiparsky
0
148
Member Avatar for tech9x

Same problem except you are calling cin after getline() [url]http://www.daniweb.com/forums/thread327922.html[/url]

Member Avatar for jonsca
0
152
Member Avatar for qvyhnl

The key is to read the lines from test.cpp into a vector then only write back lines that dosen't start with "//" and you need to do some thinking on "/*" and "*/". Also there is no reason to pass the 2nd parameter, you can do all the read and …

Member Avatar for geojia
0
184
Member Avatar for tech9x

your problem is switching between cin and getline(). Try: [CODE] int main() { int i; char * cstr; char * p; string *userInput; int sizeOfArray; getline(cin, sizeOfArray); //changed add(i,userInput,sizeOfArray); system("PAUSE"); return 0; //your main needs an int return val } void add(int i, string *userInput, int sizeOfArray) { string Input; …

Member Avatar for Zjarek
0
280
Member Avatar for MissaDev

Can you give an example of your input and output? (what you expect and what you are currently getting)

Member Avatar for mitrmkar
0
131
Member Avatar for tech9x

try [CODE] #include <string> [/CODE] string.c_str() is a method for a string, and has nothing to do with including the cstring

Member Avatar for jonsca
0
382
Member Avatar for mybluehair

try: [CODE] PlaySound(songLocation.c_str(),NULL,SND_FILENAME|SND_ASYNC); [/CODE]

Member Avatar for geojia
0
127
Member Avatar for Glapsides

[QUOTE=Clinton Portis;1399210]would you like a side of fries with your order..[/QUOTE] "Please do not respond with liners" You should post the submission procedure so I can just do it for you.

Member Avatar for Glapsides
-4
117
Member Avatar for lochnessmonster

Another way to help you think about this problem. If you know calc then this will make more sense. Think about it this way. 1. you are on a number line, specifically a segment from 0 to 0.01 2. the idea is you are taking an infinite number of half …

Member Avatar for geojia
0
111
Member Avatar for mybluehair

[QUOTE=mybluehair;1399111]I've got a chunk of code that opens up a txt file with 5 or 6 lines inside. I only need to grab the first line of the txt file and put it inside of a variable. The problem is that when I use this code, instead of grabbing the …

Member Avatar for Duoas
0
423
Member Avatar for ntaraaki

>>search for data in super-fast constant time O (1) takes place. This is pretty hard to accomplish, unless you have a hash table. So if this is a requirement, then you need to implement a hash table. If you can do O(log n) you can use a sorted array, or …

Member Avatar for geojia
-1
231
Member Avatar for DallasFan3

first put the list of your numbers in an array. 1. median: get array.size() [CODE] if (odd) median=array[size/2-1] //if size=3 return array[1] if even median=(array[size/2]+array[size/2-1])/2 [/CODE] 2.mean: [CODE] int mean; int sum=0; for(int i=0; i<array.size(),i++){ sum+=array[i]; } mean=sum/array.size(); [/CODE]

Member Avatar for geojia
0
111
Member Avatar for thisischris

if M1 has 5 titles in it your program crashes when it gets M1[5] because the 5 titles are in M1[0],M1[1],..M1[4] [CODE] for(int i=0;i<M1.size();i++){ if(M1[i].Get_Title()==T1){ M1.erase(M1.begin()+i); cout << "Movie deleted." << endl; TT++; } }[/CODE]

Member Avatar for thisischris
0
96
Member Avatar for Abayiz

it's only generating 1 column because you are using get() you need to use getline(). get() and cin are both " " delimiter.

Member Avatar for Abayiz
0
170
Member Avatar for liveurlifeteddy
Member Avatar for liveurlifeteddy
0
111
Member Avatar for steve_Student

Please enclose your code in code-tag so it's easier to read. But have you tried; int counter=1; while{ cout>>counter++; }

Member Avatar for steve_Student
0
166
Member Avatar for blackxswil

Please place your code inside (CODE). And you should have a parameter inside your Student class that keep track of it's classes, such as an array of size 5. Then you can call addcourse(Course course) inside your Student class, where you add new Course objects to the array. Hope that …

Member Avatar for geojia
0
183
Member Avatar for muze

If you have a program that's just a GUI then it shouldn't do anything. Since your program is crashing on the same "run" are you testing different things (your problem is on the 2nd thing you are testing) or are you testing the same function (mostly likely you are allocating …

Member Avatar for muze
0
86
Member Avatar for manutd4life

Does the problem only occur when you are running the program with the .txt file open? There might be write conflict, it's like the warning you get while trying to remove a file while it's open in a program.

Member Avatar for manutd4life
0
116
Member Avatar for precila

Please use code tag. And this is a problem[CODE]Int a[100], n, i, j, temp, loc, min ;[/CODE] I don't know if you can declare vectors and int's on the same line but I've never seen it done that way before. Also "Public: " should go before your parameter declaration.

Member Avatar for geojia
0
193
Member Avatar for anurag09
Member Avatar for scoob

You have 450 lines of code! I suggest you try to tackle this problem step by step. 1. change your Node class so that it has a *prev of class Node 2. Implement constructor() everything is same except set start.prev to null. 3. implement add node(Node *currentNode, Node *nodeToBeInserted) here …

Member Avatar for scoob
0
268
Member Avatar for rsantoosa

The End.