Hi all I was wondering how to pass a multidimensional array to a function: Here is my code: [CODE] #include <cstdlib> #include <iostream> using namespace std; void PrintArray (int* array, int n); int main(){ int SIZE; cout << "Enter how many records: "; cin >> SIZE; int array[SIZE][2]; for (int i =0; i < SIZE; i++){ cout << "Enter an Integer: "; cin >> array[i][0]; cout << "Enter a user ID: "; cin >> array[i][1]; } cout << endl << "The list you put in is: " << endl; PrintArray(array, SIZE); system("PAUSE"); } /* This function prints an Array Arguments: …

Member Avatar
Member Avatar
+0 forum 9

[CODE]#include <stdio.h> #include <string.h> void proba(char *test) { int i; char det = *test; printf("%s", det); } int main(void) { char datar[] = "asds"; printf("%d \n", datar); proba(datar); return 0; }[/CODE] printf("%s", det); is the problem. When its turn to execute its trowing me out from the app. With "wrong address"

Member Avatar
Member Avatar
+0 forum 4

Hi, I can pass an array through jquery ajax. [CODE] var regSubCodeArray = new Array(); var temp = 9; var i; for(i=0;i<temp;i++) { subname = 'sub'+i; subcode = 'sub_code'+i; subcredit = 'sub_credit'+i; regSubCodeArray[i] = document.getElementById(subcode).innerText; } $.ajax({ url: "testArray.php", type: "GET", data: "page="+regSubCodeArray, cache: false, success: function (html) { $('#ttl').html(html); } }); [/CODE] In 'testArray.php', i did the following [CODE] echo $_GET['page']; [/CODE] It prints all the data of the array. But i want to access each data using some foreach loop in my testArray.php page. Can any-one help me??

Member Avatar
Member Avatar
+0 forum 7

Hi to all I use a cms and I want to modify an its module. I need to pass a variable to a xml file (this xml is necessary for a flash slideshow), like the value of a folder like '/example' If I create a system variable in php and then I recall it in xml, is it possible? byee

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm new to this community and hope im in the right place :-) I have been searching everywhere for the proper method to pass input from one html form to another. I have found a bunch of javascript that is supposed to break down a query string and populate the second form based on that, but no matter what i try i cant get it working. Basically, im trying to have a small form on the main page where a user would enter some basic info (name, etc.) and also choose from a drop down menu for one selection. …

Member Avatar
Member Avatar
+0 forum 1

Hello all, I am getting the following linker error when I try to pass an object of type "string" to a function. Otherwise, the code compiles correctly. exercise_3.10.obj : error LNK2019: unresolved external symbol "void __cdecl reshuffle(unsigned int,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?reshuffle@@YAXIIV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main Here is my code: [CODE] #include <iostream> #include <conio.h> #include <string> #include <cctype> void reshuffle (std::string::size_type,std::string::size_type,std::string); int main() { std::string s; std::string::size_type index(0); std::string::size_type size(0); std::cout << "Please, enter a sentence with full " << "punctuation:\n\n"; getline(std::cin,s); size = s.size(); for (index = 0; index != size; ++index) { if (isspace(s[index])) { …

Member Avatar
Member Avatar
+0 forum 2

I am writing code for a guessing game program. The game is supposed to generate a random number, 3 digit number and let the user guess what it is, providing feedback for every wrong input. It is also supposed to perform 10 iterations, keeping track of the number of guesses. It then should use this record to determine the fewest guesses it took to figure out the number. I have the program set to execute 2 iterations for ease of troubleshooting. It also provides the secret number generated for reference. I have been having trouble implementing a method of logging …

Member Avatar
Member Avatar
+0 forum 9

I have a button which starts processing. I want that when ever a button is click from page1.aspx .. a count down timer should start and displayed on page2.aspx. I am thinking of using iframe to join 2 pages. Please let me know your suggestions. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi all im doing a project on bed ordering system. There i'm using some text boxes to display the selected bed item's description ( like manufacturer, size of bed & price of bed). When the user input the value for the quantity text box & click on the add button; i need to pass the text box values to the data grid, calculate the total amount to be paid & display that amout also on the data grid. (finally data grid has 4 columns as bed model, price ,qty, total) [b][color="red"]how can i pass those selected text box values to …

Member Avatar
Member Avatar
+0 forum 2

Hi, I am new to this website (and C++) so pls forgive any newb errors / convention mistakes. I have a project that contains both a normal source file (PB.cpp), associated header (PB.h) and a windows form (GUI.h). I'm trying to pass a variable from the form to a function in PB.cpp but i get the error: c:\bot\pb\pb\GUI.h(419): error C2660: 'funcdec' : function does not take 1 arguments A simplified version of the problem is below: [U]PB.h:[/U] [CODE]int funcdiv();[/CODE] [U]PB.cpp:[/U] [CODE]#include "stdafx.h" #include <iostream> #include "GUI.h" using namespace std; using namespace System::Drawing; using namespace PB; int funcdiv(int x) { int …

Member Avatar
Member Avatar
+0 forum 3

I have little bizarre problem. Working in Java web development we have project that we use plenty of templates from Velocity. Where one template can refresh section of it self and display one or more templates. My problems is that in parent template I have to pop up window with message if in child template and item from group A been moved to group B or vice-versa. Anyone has any idea how change on child template can be propagated up to parent?

Member Avatar
Member Avatar
+0 forum 3

Hi I am making an mp3 database at the moment and i have run into some difficulty when passing down the array to a function. I can do it when i create the array globally as obviously this means i dont have to pass it down, but i want to learn how to do it properly - have only been learning for a few months so i am still getting used to it all. here is my code [code=c] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #define MAXLENGTH 50 #define MAXGENRE 15 #define MAXMP3FILES 100 #define MAXFILEPATH 400 #define …

Member Avatar
Member Avatar
+0 forum 3

[CODE] #include <stdio.h> #include <stdlib.h> int det(int); int minor(int); int main() { int mat[10][10],dim,a,b; printf("Please enter an integer for matrix dimensions(1-10):"); scanf("%d",&dim); for (a=0;a<=dim-1;a++) { for (b=0;b<=dim-1;b++) { mat[a][b]=rand()%10+1; printf(" %d",mat[a][b]); } printf("\n\n"); } printf("Determinant for the matrix is: %d",det(mat)); return 0; } int det(int mat[10][10]) { int a,b,temp,length; length=0; for (a=0;a<10;a++) { if mat[a][0]!=0 length++; } if (mat[1][1]==0) { temp=mat[0][0]; return temp; } a=rand()%10; b=rand()%10; return ((-1)^(a+b))*mat[a][b]*det(minor(mat,a,b)); } int minor(int mat[10][10], int x, int y) { int a,k,i,length,minor[10][10]; length=0; for (a=0;a<10;a++) { if mat[a][0]!=0 length++; } for (i=0;i<length;i++) { for (k=0;k<length;k++) { if (i<x && k<y) minor[i][k]=mat[i][k]; else if …

Member Avatar
Member Avatar
+0 forum 4

The End.