No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
33 Posted Topics
Re: [code=csharp] using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { bool current = false; int j; Console.WriteLine("Enter any integer"); int num = Int32.Parse(Console.ReadLine()); for (int i = 2; i <= num; i++)//2 is the first prime number. //I set i to 2 … | |
Hi all; I've to update a record for my hw.I'm trying to use seek function but when I use it, new information(phone number) is being written at the end of file... Here is the function that I've tried... Assume that the file's content like below and the input is : … | |
Re: [quote=1qaz2wsx7;406221]Hi :) I have some object in a forum, and i want that those objects will be resize and moved proportionatly after i resize the forum. (like when i make the forum width bigger, i want that all the object will get bigger with the forum) Is there an Automatic … | |
Hi ; How can I show a nested method call(like getInsertedCourses method below) in a UML sequence diagram ??? [CODE=csharp] static void Main(...) { Student s = new Student(...); Course[] courses = s.getInsertedCourses(); } class Student { private int studentID; ....... public Course[] getInsertedCourses() { return SRS.getInsertedCourses(this.studentID); } ....... ....... … | |
Hi all; I have to create a Binary Tree(not a Binary Search Tree) whose node values are produced randomly... If I had to create a Binary Search Tree , I could determine where the current node has to be inserted but in a Binary Tree I can't determine where the … | |
Re: Set your panel's Anchor property to Top,Bottom,Left,Right in the properties window so when you resize your form at the runtime your panel will be resized with your form consequently... | |
Hi all... How can I control any postfix expression is valid or not??? I controlled it using a stack(the code is below) and it worked but I 'm using the stack again after clearing it for evaluation the postfix expression to the infix expression.I'm using the stack twice and I … | |
Re: [quote=1qaz2wsx7;405594]Hi :) How can i turn a forum to the default forum ? (the one that is shown at the beginning automaticly) Thanks.[/quote] Go to the solution explorer , chose the Program.cs and change this line "Application.Run(new Form1());" | |
Re: Try to read the table row by row and compare user name and password for each read.Please look at the code sample below... [code=csharp] private void button1_Click(object sender, EventArgs e) { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0; Data" + "Source=myDB.mdb"); OleDbCommand com = new OleDbCommand("SELECT User_Name,Password FROM Table1",con); OleDbDataReader reader; bool … | |
Re: Yes you can create an array of textboxes.Look at the code below. [code=csharp] public partial class Form1 : Form { TextBox[] txt = new TextBox[3]; //Creating an array of textbox //references NOT an array of textboxes. public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { for(int i … | |
Re: Wrtie the "itr = strv.begin();" after the cout... I think when you initialize itr = strv.begin(); at the beginning of the code the itr points a random value at memory and when cout attempts to write this value it causes an error. But when you initialize the "itr" after the … | |
Re: Look at your array declaration.(int num[i], what that means???You must initialize the array with its size) Ensure that the "size" variable should less or equal than the array size and start your loop 0 < size instead 1 <= size so when the user enters the array's size for size … | |
Re: Your output is wrong because you're starting the inner for loop at 0 every time.So when a[x] == ' ' it's writing start point to ' '. You should save the ' ' character's index in a variable and start the loop at this variable. Finally there is not a … | |
Re: [code=cplusplus] struct Song { string title; int track; }; struct Album { string albumName; string artistName; struct Song songList[4];//If you want to initialize this without struct //keyword you've to use "typedef" }; int main(){ struct Album collection[5]; //..... //.... return 0; } [/code] | |
Hi all; My question is which IDE do you recommend for editing Python codes on WindowsXP??? I've installed its interpreter(2.5) but I don't have any idea about the IDE.(except ActivePython) Thanks for your helps... | |
Re: Be sure temp = start_ptr at the beginning of the CD :: list() function and write the if(temp == NULL) control before the loop otherwise the program always compares the temp == NULL or not.But you're already doing this control with the do-while's condition (temp != NULL) | |
Hi all; I have to control wheter a string is an array element or not. I tried to exists function but it didn't give me the desired output. [code=perl]print "Which hotel do you want to remove from the list?\n"; chomp($a = <STDIN>); if(exists $name {$a}){ foreach $record(@name){ if($record eq $a) … | |
Hi all; I'm new to C++ and OOP. My problem is: I ' ve created the header file time1.h and included it in my project but when I tried to compile it gave me linker errors in VC++ 6.0. Here is the code: My header file [B]time1.h[/B] [code=c] #ifndef TIME1_H … | |
Re: What do you mean??? The above code returns sum of fab()'s return value for n - 1 and n - 2... | |
Re: assign zero to the variable "again" when the program shortly after enters the loop...(For example : Between the lines 5 - 6) | |
Re: This is a simple character and string question.If you look at your book or searching a little, I'm sure you'll find your question's answer... (Try to search "character handling library") | |
Re: It isn't neccessary a nested loop.You can do it with one loop like the following code...(Assume that j = 0 at starting) [code=c] for(i=0 ;i<=num; i++) // loop to store values in array { if (str[i] != ' '){ result[j]= str[i]; j++; } } [/code] | |
Hi all; I've to use a dynamic array(2D) in my program in C. I've read some tutorials about this and I understood its mental.But still there exist a few points which I didn't understand. Here is a code: [code=c] int main(){ int **a, x; a = (int **)malloc(sizeof(int) * 10); … | |
Re: You're using Visual Studio 2005 and projects which are coded in VS2005 need to .Net Framework 2.0 for working. Check the other computer for the .Net 2.0 is loaded or not. May be this is the problem... | |
Re: On my system Dev-C++ IDE supports the long double data type and shows it 12 byte(96 bit) with sizeof(); For more information you can look at here: [url]http://en.wikipedia.org/wiki/Long_double[/url] | |
Re: I think the program must know how many words will the user enter... Try to ask how many words will the user enter and orientate the program to this... | |
Re: In first function void findmaxLocation (int list[], int size) you can't return a value.Because the functions, which types are defined [B]void [/B]can't return a value. Change it from void to int ([B]int[/B] findmaxLocation (int list[], int size) [code=c++] void findmaxLocation (int list[], int size) { int max, maxlocation; max = … | |
Re: if you don't do for(i = 0; i < SIZE - 1(5 in this example); i++) you try to reach the array[SIZE(6 in this example)] which doesn't have any user defined value... | |
Re: [code=c] #include <stdio.h> int functionname(int value1,int value2); int main() { int a; int parameter1,parameter2; a = functionname(parameter1,parameter2);//If you want to store the value in a variable which is returned by the function... functionname(parameter1,parameter2);//If you want to call the function only.... return 0; } int functionname(int value1,int value2) { ..... ..... … | |
Re: [quote=IwalkAlone;332274] I am not gettin the desired output. And what does it mean by first occurence of search string? Does it mean the whole string or first letter of search string? HELP!!:confused: :sad:[/quote] It means whole string of search string... For example: Input : I Have This Book Search : … | |
Re: [quote=IwalkAlone;332335]Which other fucntion can I use instead of gets to accomodate a string with spaces? And when I use getchar() in my compiler, it does not accept the input and so does not proceed with the code.[/quote] You can use a loop to receive the string character by character... For … | |
Re: I wish you had written the language which you are using... I wrote it in C but you can easily integrate it on C++... [code=c] #include <stdio.h> #include <math.h> int main() { char ch;//input character int ascii;//input's ascii equivalent int b,i; double sum = 0;//You can initilaize it to int … |
The End.