aw crap. i was programming late at night and mistook & for $.
thanks a lot !!!!!!!!!!!!!!
User Profile
Collapse
-
Expecting `T_PAAMAYIM_NEKUDOTAYIM'
On line 70, I get parse error: parse error, expecting `T_PAAMAYIM_NEK UDOTAYIM' in G:\xampp\htdocs \2DArray.php on line 70.
Please help :D. I've googled for an hour and couldn't find anything to help !
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
-
nvm.. i know what's the problem ...
i have to declare it like this vector <vector<int> > grid2(15, vector<int>(15) );Leave a comment:
-
no match for 'operator=' in vector[][]
Code:#include <iostream> #include <math.h> #include <vector> using namespace std; int main (void) { int sv = 0, fv = 0; cout << "Start Value:" << endl; cin >> sv; cout << "End Value:" << endl; cin >> fv; cout << endl; int size = (int)sqrt(fv-sv)+5; [B]vector[/]
-
Omg. Woohoo. It worked. Thanks Jos and Laharl.
jButtonAction (evt,(JButton)e vt.getSource()) ;...Leave a comment:
-
Passing a General Reference
In this code, where the ****** are, I want to pass a reference to the jButton8 object. I don't want to pass it to be button specific though, I want the code to be button general, to pass whatever jButton the method is declared in. Is it possible?
Thanks !
jButton8 = new javax.swing.JBu tton();
jButton8.addAct ionListener(new java.awt.event. ActionListener( ) {
public void actionPerformed (java.awt.event .ActionEvent... -
Thanks for your replies guys! :) I was just wondering if it was possible, because it would be a easier way to solve my problem. I should have realized earlier though that something like that doesn't exist. I'm currently working on the other possible solution to the problem, and if i get stuck, I know where to ask if I need help again :).Leave a comment:
-
Way to get reference to object that called method?
Is there a way to get a reference to an object that called a method without passing the object to the method arguments? Thanks for reading. -
EDIT : Hey. I solved my problem. It was a problem with recursion. Stupid me :P.
Thanks !
Hey thanks very much. This problem is very strange :p
here's the input, code (important parts bolded) and output
the input
Code:105 14 16 IIIIIIIIIIIIIIII I......I.......I I......III.....I I........I.....I I........IIIIIII IIIIIIIIII.....I
Leave a comment:
-
Assigned Return Statement is Different Than Return Statement
I basically have a function that returns an int. I know that the value of the int should be 6, but when I assign the function to an int variable, that int variable has a value different than 6.
Or in other words
int main(void)
{
int ff= 0;
ff= f1();
cout << ff;
}
int f1 ()
{return 6;}
Output
2342342424
Thanks! -
How to Change Default Address of Command Line Windows XP
I know you can use cd "name of file path" to change the address but I want the address to be a certain filepath once I open the command line to make things easier. How would you do that? -
How to Open and Edit Java Files ?
Hey. Naive question, how do you open and edit java files? I use NetBeans IDE 6.01.
Let's say I save a hello world program, I try to double click it, use the open with Netbeans, notepad, anything I could, but I all I get are these weird characters.
Shouldn't it just open, ready to edit with my installed IDE, like C++ files?
I've also installed JDK 6 update 5.
Thanks for reading ! :) -
Multidimensional Array Problem
Hey, my program is doing freaky things.
I'm trying to store pairs of values, but my program doesn't store them right.
For instance, if I input 2 for moves, then 1,2,3,4, the program outputs 1,3,3,4.
I can't put my head around why it won't output 1,2,3,4 and it outputs 1,3,3,4.
#include <iostream>
using namespace std;
int main(void){
int moves;
int cmoves... -
Multiple Map Assignments
Hey I'm just wondering if something similar to this is possible?
map <string,int> letter;
letter["a","d","g","j" ,"m","p","t","w "] = 1;
Or is there no other way and I have to do it like this.
letter["a"]=1;
letter["d"]=1;
letter["g"]=1; -
Thanks for the advice!
I think I've found the problem and it's different from what I described here, it's actually a different problem. The 2 codes are exactly the same, but I think Dev C++ Bloodshed has problems with recursion. I tracked the values of recursion for the turing and C++ one, they are the same numbers except the C++ starts getting different values after 20 numbers or so and stops early. I've heard of related problems...Leave a comment:
-
Turing to C++ Program Problem
Hi guys. I'm practicing for the CCC, a programming competition. I got stuck on a problem, so I copied the problem's answer from turing into C++. When I run my program in C++ though, I get a different answer from the one in turing. I've been spending hours trying to find the difference between the turing answer and my C++ answer, but to no avail. So basically, I'm asking what's the difference between the turing and C++ program?
Correct...
No activity results to display
Show More
Leave a comment: