Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0

44 Posted Topics

Member Avatar for MareoRaft

1. I see %f is for float, %@ is for string. Is %d for anything? Which % is for double? Which % is for BOOL? 2. What is the different between double and float? When I put float flow=-8.1234567890123456789; //4 bytes floating point double dobble=-8.1234567890123456789; //8 bytes floating point NSLog(@"flow …

Member Avatar for geojia
0
173
Member Avatar for MareoRaft
Member Avatar for MareoRaft

This code gives me the error message "warning: passing argument 1 of 'stringWithCString:encoding:' makes pointer from integer without a cast" #import <Cocoa/Cocoa.h> #import <Foundation/NSObject.h> #import <stdio.h> //#import <string.h> @interface Numbers : NSObject { NSString *name; int age; NSMutableArray *list; } //-(void) setName; -(void) setAge :(int)a; @end @implementation Numbers -(void) setName{ …

Member Avatar for Moschops
0
147
Member Avatar for MareoRaft

Hello, I have learned some basic Java, but now I want to learn Objective-C. Is there a tutorial or problem set of programs to make that I can follow to quickly learn the basics? Here is what I know how to do so far... #import <Foundation/Foundation.h> int main (int argc, …

Member Avatar for ChrisPadgham
0
210
Member Avatar for deceptikon

I am not sure I know enough to really understand your code. I am trying to learn Objective-C. One thing I noticed is common is that in the creation of a class, it is done in a header file like so... FILE 1 | class.h | declares the class, the …

Member Avatar for deceptikon
3
609
Member Avatar for Riteman
Member Avatar for MareoRaft

I recently installed a 2nd HDD in my optical drive space using an optibay imitator. Basically, there is a PATA to SATA converter so that I have an HDD instead of a disk drive. It is a late 2006 MacBook white. Everything worked great except for one minor glitch. When …

Member Avatar for tompatrick
0
136
Member Avatar for MareoRaft

Hi! Sorry if this is the wrong forum to post this on but... I had a Leopard computer with all developer tools installed. Then I upgraded to Snow Leopard (erase and install), and restored from time machine. I tried the gcc command only to get "gcc: command not found". The …

Member Avatar for anne_admin
0
135
Member Avatar for MareoRaft

I have Snow Leopard. I installed rEFIt via the package. Then I installed Ubuntu via this guide (dual boot): https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation Afterwards everything worked, and I could even boot Ubuntu without using rEFIt. I decided to uninstall rEFIt since I had no need for it. So I followed the instructions here …

0
106
Member Avatar for hamby

In "push_back()" you are supposed to input the value which you are adding to the vector. For example, v.push_back("hello") Perhaps you were under the impression that the value you put in push_back is the number of new slots being created. I believe your code should look like this: [CODE]for (int …

Member Avatar for hamby
0
7K
Member Avatar for MareoRaft

Hello, I am looking for a good library to manipulate matrices. The criteria is as follows... 1. It must have a large amount of functions that we may need to use in the future. Functions will include but are NOT limited to: --sortbyc( Mat, col) (sorts rows in a matrix …

Member Avatar for L7Sqr
0
163
Member Avatar for aiwasen

[CODE] while(y<=num) { x= x + y; y= y + x; cout<<" "<<x<<" "<<y; }[/CODE] let's say you don't want y to be bigger than 34. Let's say num=34 and y=33. Look at the above code. It sees that y<=num, and runs what is inside the brackets. Inside the brackets, …

Member Avatar for Member #897610
0
188
Member Avatar for aomas98

it looks like ztdep has done it. please mark the thread as solved when your problem is solved ;)

Member Avatar for Rashakil Fol
-2
183
Member Avatar for MareoRaft

1. In a for or while loop, if the condition is breached in the middle of the brackets {}, will the code immediately stop the loop, or wait until it gets to the bottom of the brackets {} ? 2. If a function is called in my code, does the …

Member Avatar for svilla
0
103
Member Avatar for MareoRaft

when I... [CODE]double a = 0.00000001; cout<< a <<endl;[/CODE] The computer outputs 1e-07. I want to force the computer to write it as 0.00000001 thanks! ;)

Member Avatar for MareoRaft
0
206
Member Avatar for afi@alvi

you can download DevTools from the apple website to get the SDK. try looking here: [url]http://developer.apple.com/devcenter/ios/index.action[/url] at the bottom it says "iOS 5 beta and Xcode 4.2 with iOS 5 SDK beta" you need to create an account which is free

Member Avatar for mrnutty
0
200
Member Avatar for MareoRaft

This code compiles but refuses to run. NONE of the cout statements appear, as if the program is in an infinite loop except that its not. [CODE]#include "matrixOpsLibrary.h" #include <iostream> using namespace MattsMatrixSpace; using std::cout; using std::endl; Mat pattern( unsigned K ){ cout<<"5"; Mat alpha; //this becomes our A variable …

Member Avatar for MareoRaft
0
192
Member Avatar for MareoRaft

error: ‘void __stderrp(MattsMatrixSpace::Vec)’ redeclared as different kind of symbol I have a function called "stderr" in my program. I'm not sure where the "__" or the "p" came from. Any idea what this error is related to? PS, the next error is: /usr/include/stdio.h:169: error: previous declaration of ‘FILE* __stderrp’

Member Avatar for Salem
0
427
Member Avatar for MareoRaft

What is the easiest way to check if a vector is empty? [CODE]#include <iostream> #include <vector> using namespace std; typedef std::vector<double> Vec; typedef std::vector<Vec> Mat; int main(){ Vec v; // this is what i consider to be an "empty" v if( /*check if v is empty here*/ ) cout<< "v …

Member Avatar for NathanOliver
0
142
Member Avatar for ahmed30

you must post up your code so that we can reproduce the error. Otherwise we cannot help you. :)

Member Avatar for ahmed30
0
123
Member Avatar for MareoRaft

This function is returning the error "matrixOpsLibrary.h:11: error: invalid initialization of reference of type ‘const std::Vec&’ from expression of type ‘const double’" [CODE]#include <vector> #include <cmath> using namespace std; typedef std::vector<double> Vec; //Vector Vec floor( const Vec& y ){ unsigned n = y.size(); Vec bottom(n); for( unsigned e=0; e<n; ++e …

Member Avatar for MareoRaft
0
206
Member Avatar for MareoRaft

What happens when you set an int or double value to less than the minimum? I need my program to recognize when a number is smaller then the minimum, and then set the value to equal the minimum instead. This behavior is not the default... [CODE]#include <iostream> using namespace std; …

Member Avatar for mrnutty
0
142
Member Avatar for MareoRaft

I want two function names that do the same thing, allowing the user to use whichever they prefer. For Vec a, i use "const" because a is never changed. Correct me if this is the wrong usage. For int n in operator|, i do NOT use "const" because n is …

Member Avatar for mike_2000_17
0
311
Member Avatar for madriceg

I suggest posting up the full code of some of the ways you tried using LoadString along with the specific error you get for each. ;)

Member Avatar for madriceg
0
2K
Member Avatar for MareoRaft

I was advised that I should not import the std namespace in a header. Also, I should create my own namespace for my library (a header file I created with function in it). Why is it a bad idea to use the std namespace for my new functions? If all …

Member Avatar for mrnutty
0
158
Member Avatar for MareoRaft

There is an error concerning lines 10-14. I had been using this code previously without errors. I'm not sure what I may have changed. The error is "invertMatrix.cpp:14: error: invalid use of incomplete type ‘struct std::stringstream’ /usr/include/c++/4.2.1/iosfwd:83: error: declaration of ‘struct std::stringstream’ " [CODE]#include <iostream> #include <vector> #include <cmath> using …

Member Avatar for mrnutty
0
2K
Member Avatar for MareoRaft

I am building a library of matrix and vector operations. As my library has grown bigger, I have found that there are MANY by element operations which I need to program. For example, if the user wants to multiply each element in the matrix by 2, or if the user …

Member Avatar for mike_2000_17
0
164
Member Avatar for MareoRaft

What is the difference between "int main(void)" and simply "int main()"? Is "int main()" acceptable?

Member Avatar for Raphaelnad
0
470
Member Avatar for dina154

Do you want the high score to be recorded only while the program is running, or forever? If you want it only while the program is running, you can create variables called "int highscoreNumber;" and "int highscoreAlphabet;" at the beginning of your int main(). Then, in your case 4, you …

Member Avatar for dina154
0
2K
Member Avatar for king03

[CODE] system("pause"); return 0; } [/CODE] Also, the experts suggest: "Don't use system("pause") to pause your program if possible. Use getchar( ) if you are using C and cin.get( ) if you are using C++." This tip found here: [url]http://www.daniweb.com/software-development/cpp/threads/67837[/url] :)

Member Avatar for MareoRaft
0
605
Member Avatar for MareoRaft

x.find() does not return the proper values for x.find('J'), x.find('K'), and x.find('.'). Do you know what could be the issue? It could possibly be x.substr() which is causing the issue. I want the variable q to be "q_J30_K5.txt". [CODE] #include <iostream> using namespace std; short ato( string number ){ return …

Member Avatar for MareoRaft
0
544
Member Avatar for MareoRaft

[CODE]int operator%( double a, double b ){ int aa = (int) a; int bb = (int) b; return aa%bb; }[/CODE] gives me an error message "must have an argument of class or enumerated type"! As you can see, I want a simple program which truncates doubles into their equivalent integers, …

Member Avatar for NathanOliver
0
7K
Member Avatar for tow3lie

Is your assignment to actually find the moves to switch the tower, or simply to find the NUMBER or moves necessary? If you only need the NUMBER of moves, then you should be able to derive a formula for it, and no programming is really necessary. If you need to …

Member Avatar for MareoRaft
0
193
Member Avatar for Batch File

If you are using a mac, I suggest downloading the free Developer package and then compiling the code in the Terminal. The Developer package includes other compilers that you might be interested in, such as Perl.

Member Avatar for Batch File
0
158
Member Avatar for dgreene1210

I suggest posting up the error messages on the forum. They will tell us exactly what is wrong with your program. If there are a LOT, then just post the first few. Also, I suggest writing a simpler program. This will allow you to pinpoint errors before writing something so …

Member Avatar for MareoRaft
0
985
Member Avatar for MareoRaft

This program refuses to take foom as input, yet if I were to put "matrix.txt" into the function instead of foom, it would work fine. [CODE]#include <fstream> #include <iterator> #include <sstream> #include <vector> #include <string> // needed? using namespace std; typedef vector<double> Vec; typedef vector<Vec> Mat; Mat readMatrix(string foom){ Mat …

Member Avatar for mrnutty
0
254
Member Avatar for dgreene1210

At the beginning of your "main (void)" function, I see "{ int num1, num2, num3, float num4, int calc1, int calc2, int calc3, int calc4, double calc5, double calc6, float calc7, float calc8);" Notice that it ends with a ")", but there is no "(" before it. That must be …

Member Avatar for raptr_dflo
0
185
Member Avatar for MareoRaft

I have a Plain Text matrix file (called q.txt): [CODE]1 0 0 0 2 0 0 1 1 0 0 1 1 1 1[/CODE] which I would like to read into a matrix, which is a vector containing vectors (which contain doubles). My current codes yields the error "newReader.cpp:22: error: …

Member Avatar for MareoRaft
0
1K
Member Avatar for MareoRaft

Hi! I am looking for a solution to use the onKeyPress() event in Safari or Chrome. It seems very tricky, because each browser behaves differently. This is what I have so far... [CODE]... <script type = 'text/javascript'> function turn(e){ alert('turn!'); } </script> <body onKeyPress='turn(event)'> </body> ...[/CODE] I also want to …

0
63
Member Avatar for MareoRaft

Here is a simple program which gives me unexpected results: [code=c]int main() { printf("\nTo calculate a^b, enter value a now.\n"); int a = getchar() - '0'; printf("\nEnter b now.\n"); int b = getchar() - '0'; printf("a = %d, b = %d\n\n", a, b); return 0; }[/code] if i hit a …

Member Avatar for MareoRaft
0
3K
Member Avatar for Anil2447

please note some small syntax changes i have made to your code. although they seem like a burden, this sort of correctness and neatness will make the code clearer and easier to understand. best of luck! ;) [code=c]#include <stdio.h> #include <ctype.h> int main() { int c, nletters[26], i; for (i …

Member Avatar for challarao
-1
112
Member Avatar for newton_LA

what is a divided difference table? what are p1(x), p2(x), etc...? I would love to help you out, but you need to give us more details. Please explain it clearly.

Member Avatar for tito4life
0
1K
Member Avatar for daredevil786

in fact, [CODE]printf("15%!"); //prints 15![/CODE] (note small syntax error above) ;)

Member Avatar for MareoRaft
0
137
Member Avatar for MareoRaft

I have just begun to learn HTML about a month ago. My objective is to create a site that any visiter may post onto. (Kinda like the site you are on now just a lot simpler). In other words, the person would type stuff in a box, and press submit. …

Member Avatar for zippee
0
214

The End.