199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jmay1327

I am trying to display the sNames vector. I am not sure if I am storing the information correctly. Any help would be greatly appreciated. Also I am trying to get an average for each students exam grades and a class average, and I am not sure how to go …

Member Avatar for jmay1327
0
214
Member Avatar for niyasc

[CODE] #include<stdio.h> #include<conio.h> #include<malloc.h> int main() { int i=0,j=0,n=0; char *a,**b; a=(char *)malloc(sizeof(char)*50); printf("Enter your text\n"); gets(a); while(a[i]!='\0') { *(b+n)=(char *)malloc(sizeof(char)*20); //error for(j=0;a[i]!=' ';i++,j++) { *(*(b+n)+j)=*(a+i); } i++; n++; } printf("Words in given text are \n"); for(i=0;i<n;i++) { puts(*(b+i)); printf("\n"); } printf("Possibile combinations are \n\n"); for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(j!=i) …

Member Avatar for niyasc
0
253
Member Avatar for ryanfsf

i want to ask something about my assignment. heres the code [CODE]#include <stdio.h> int main() { int nilaiuts[5],nilaiuas[5],nilaitugas[5]; int i; float total=0; printf("Masukkan nilai UTS mahasiswa [5 mahasiswa] :\n"); // proses memasukkan data ke array for (i = 0; i < 5; i++) { printf("Mahasiswa %i : ", i+1); scanf("%i",&nilaiuts[i]); …

Member Avatar for WaltP
0
222
Member Avatar for murnesty

if i declare size 5 array [CODE]char ch[5]={'1','2','3','4','5'};[/CODE] Then the null will store at the address ch+5 ? even i didn't declare the size for the null to place. If so mean it may overlap value on that memory address?

Member Avatar for NP-complete
0
164
Member Avatar for Graphix

Hi, In the past few months I've been learning how to make applications for android by making small games just for the fun of it. I am stuck at the moment at the database object I created to manage the database, specifically the cursor: it won't close. A snippet of …

Member Avatar for Graphix
0
420
Member Avatar for monica sri

[CODE]#include<stdio.h> int main() { printf("hai;"); return 0; } when i compile this using dev c++ i get a error message as [build error][project.exe]error1 [/CODE]

Member Avatar for neeraj goswami
0
105
Member Avatar for bunik34

Hello everyone this will be my first post. I am happy that there is a forum like this with very supportive people.:) So on topic.. I am a student creating an Inventory System software for my school using VB on VS 2008. I am having trouble saving items from a …

Member Avatar for Alexpap
0
202
Member Avatar for buzz9948

I am attempting to make a number guessing game but I need to use functions I figured a good spot for this would be the greater and less than problems that I need to include to make the user know what they have, I am horrible with functions and dont …

Member Avatar for palav sandeep
0
128
Member Avatar for rarment

I keep getting a stackOverflow error in my quickSort and I can not figure out why. Any help would be greatly appreciated!! [CODE] private static void quickSortRecPriv(int[] arr, int first, int last, int ps) { int pivot = arr[first]; int left = first; int right = last; if (arr == …

Member Avatar for JamesCherrill
0
199
Member Avatar for ali13

Hi how do I get a £ to print in python 2.4.1. if I type print "£" in the terminal it works fine if I try to to that from a script it comes up with a Deprecationwarning no encoding selected and prints (don't know how to get the character …

Member Avatar for snippsat
0
470
Member Avatar for nick6987

Design a cashier change maker that will take as input: a floating point value. Value: "change due" and will convert it to proper currency (from $20 down to pennies) amounts to be handed as change to the customer i am not sure how to use the rounding correctly every time …

Member Avatar for nick6987
0
217
Member Avatar for sirlink99

I am trying out something new and I am wondering if this is valid and is not working because of some other code glitch. Graphics class: [CODE]import java.awt.*; import javax.swing.JPanel; public class Drawing extends JPanel{ KeyCommands kc = new KeyCommands (); public void startGraphics (){ System.out.println ("Adding KeyListener"); addKeyListener (kc); …

Member Avatar for sirlink99
0
151
Member Avatar for onsir

i have code like this in page1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h1>Test</h1> <script language="javascript"> function JSGetSelectedItem() { var dropdownIndex = document.getElementById('lang').selectedIndex; var dropdownValue = document.getElementById('lang')[dropdownIndex].text; alert("Hello JSCript " + dropdownValue); } </script> <!-- to fill combobox i had get from …

Member Avatar for anand01
0
3K
Member Avatar for ben1996123

Is it possible? How do I do it? I need a function to return the players name, so I have this as the prototype: [code]string getPlayerName();[/code] And this as the function: [code]string mainFunctions::getPlayerName(){ return playerName; } [/code] But I get an error saying that the function called 'string' doesn't have …

Member Avatar for ben1996123
0
98
Member Avatar for Majestics

I have a experience of network programming in java... now i want to implement them in c with more better support, i have used c++ long time a ago... Now i dont know which compiler of c++ is better, which support socket api... and which operating system provide more flexibility …

Member Avatar for doug65536
0
207
Member Avatar for Jollyyy100

Hi i'm doing a project and i need help. I'm designing a system, whereby am unable to use 2 different login authorities, which are Admin and Non-Admin. I am using VB.NET and Ms. Access and need help for the codes. I want something like, if i click on admin/non admin …

Member Avatar for maccinelyro
0
881
Member Avatar for Jeroen van Zijp

Hey all, To make it more user-friendly, I decided I want to add a JS form validation to my contact form. The essence of the JS should be that it calls for a check.php?input= with the entered captcha code appended. Then the PHP script would echo "valid" or "invalid". For …

0
107
Member Avatar for diyez treze

[CODE]<form action= '1stform.php' method = "POST"> <fieldset border = "5"> <table> <tr> <td>Check Availability</td> </tr> <tr><td> <p>Garden Room: </label> <select name="room_GR"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option …

Member Avatar for diafol
0
139
Member Avatar for hsiaoyk901201

hello, i am a C beginner. please check the code for me. The program is running fine,but is not giving the correct output or should is say no output. The output supposed to give the code of the team that ranked higher. #include <stdio.h> char rankTeams(int, int, int, int, char, …

Member Avatar for Anirudh Rb
0
203
Member Avatar for dragon_chick

Hi all. I'm writing a program to explain and verify the birthday paradox. I am generating 1000 sets (only 10 to test with) of birthdays, checking for matches, then displaying the results. I'm using srand to seed my generator and rand() to get 23 sets. The problem is 2-fold. 1) …

Member Avatar for dragon_chick
0
415
Member Avatar for Zssffssz

Ok this is somewhat of a second related post of my other one "C++ File". There is no need to read the other post just want to tell you. I want to make a console app that does the XOR thing I heard about using the simple ifstream and ofstream …

Member Avatar for doug65536
0
233
Member Avatar for Fireprufe15

Okay so I am working on small program, and halfway through I decided to make a login screen at the start. How do I make it that the login screen shows up before the main form?

Member Avatar for anijacity
0
265
Member Avatar for chezkaty

can you please help me again to this?:( cause the previous one I've asked to you i didn't get it :(( write a program that determines whether a given positive integer is an armstrong number. -----armstrong number is an n-digit number that is equal to the sum of the nTH …

Member Avatar for Anirudh Rb
0
117
Member Avatar for anujthefuhrer
Member Avatar for Master Mascus

The random function, generates the same values each the time program is run.. Any other function to output random numbers, each time the program is run ??

Member Avatar for Narue
0
158
Member Avatar for k2k

Say like I have hi() everywhere in a shell script and I would like to replace only a hi() to hi(20) right under the line "#modify only the hi() below this line". Is there anyway that I can locate the line "#modify only the hi() below this line" and then …

Member Avatar for anijacity
0
169
Member Avatar for gahhon

is possible to work of return statement with Math Class? eg, [CODE]return Math.pow(2,2);[/CODE]

Member Avatar for gahhon
0
149
Member Avatar for anujthefuhrer
Member Avatar for dospy

when you want to decript a program's protocol how do you do it? you use an packet listener(eg. WireShark) and try to figure out what each packet means? is this the only solution? cuz it seems to me like a lot of hard work, is there anything to make this …

Member Avatar for dospy
0
191
Member Avatar for coolboym99

So I'm writing a personal program right now that basically I want it to help keep me from getting distracted when at school or work, essentially letting me only access the programs that I need when at those places. My question is, whenever a program comes up in windows 7 …

Member Avatar for doug65536
0
159
Member Avatar for anujthefuhrer
Member Avatar for Wootens

Hey guys, I'm having some difficulties with this program I've been working on. Its composed of a few parts but I'm just focused on creating a linkedlist for this class. I'm trying to create seperate linkedLists for each class I'm making (just focused on teachersList) and I've been getting some …

Member Avatar for doug65536
0
115
Member Avatar for Info_stealth13

I want to have a code to this problem in C++. please help me!!! Here the problem!!! "The rate of increase in population of a certain kind of bacteria is proportional to the population at any time. if in the last eight years, the population increased from 50000 to 120000,what …

Member Avatar for frogboy77
0
136
Member Avatar for lynn21

This the question. Given. A = [1 -1 2 -2 3 -3] And matrix B = [1 0 2] what is the product A.B? Ok I'm confused because the number of rows in A is 2 and number Of columns in B is 3. So the sizes of matrices do …

Member Avatar for Rashakil Fol
0
138
Member Avatar for lastbencher

The following code is given in my Data Structure reference book. [code=c] #include<stdio.h> main() { int i, *pi; float f, *pf; pi = (int *) malloc(sizeof(int)); pf = (float *) malloc(sizeof(float)); *pi = 1024; *pf = 3.14; printf("an integer = %d, a float = %f", *pi, *pf); free(pi); free(pf); } …

Member Avatar for lastbencher
0
156
Member Avatar for ruchi18

Hi I have a project creating a website in asp.net and there i am creating three project for different access layers like data access ,business access but when I am using that namespace in my project getting error at build time type or namespace not found however I add refrence …

Member Avatar for ruchi18
0
144
Member Avatar for Shodow

can u help me convert the cout to printf..i dont have a clue how.. tnx [CODE]#include<iostream.h> #include<string.h> #include<conio.h> int findSimilar(char[],char[]); void checkValue(int,int); int main(){ char boy[50]; char girl[50]; int similarInBoy=0; int similarInGirl=0; int total; clrscr(); cout<<"Enter Boy's Name: "; cin.getline(boy,50); cout<<"Enter Girl's Name: "; cin.getline(girl,50); similarInBoy=findSimilar(boy,girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy; cout<<"Boy: "<<similarInBoy<<","; …

Member Avatar for Narue
0
556
Member Avatar for lastbencher

This code is not running. i'm using gcc [code=c] #include<stdio.h> int main() { struct book { char name[10]; float price; int pages; }; struct book b[5]; int i; for (i=0; i<5; i++) { printf("Enter name, price and pages\n"); scanf("%c %f %d", &b[i].name, &b[i].price, &b[i].pages); } for (i=0; i<5; i++) printf("%c …

Member Avatar for lastbencher
0
126
Member Avatar for anujthefuhrer
Member Avatar for doug65536
0
846
Member Avatar for Rubinder singh

I have been using code blocks for c++ i has mingw compiler which is using gcc it doesn't have conio.h header file so how do i clear the screen now ................? thanks

Member Avatar for NP-complete
0
300
Member Avatar for Dersev

Hello I have a problem how to make custom defined text area it's similar to text area which you can create in Photoshop while you wan't type any text. Is it possible to do it in swing ?

Member Avatar for JamesCherrill
0
127
Member Avatar for Pytho

Hi all I'm making a program (for my use only) which contains all the available information about atoms. I want to collect the information from Wikipedia, but if I copy & paste it takes my whole life! For example, heres the [URL="http://fi.wikipedia.org/wiki/Vety"]Wikipedia page[/URL] (sorry, it's in Finnish because I want …

Member Avatar for Pytho
0
182
Member Avatar for PHkiDz

Hello good day to all... is there anyone can help or suggest me how my code work successfully. Actually the code was working well, but i wanted to change it`s content to GUI form. the program description was the user must input a word/String and shuffle/scramble the word that the …

Member Avatar for JamesCherrill
0
236
Member Avatar for Mi_99

So my title was meant to be array not loop I need to create an application that will generate random spots so far my work is this [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.util.Random; public class Shape{ private int x; private int y; private int width; private …

Member Avatar for JamesCherrill
0
203
Member Avatar for kaosjon

Hi, i have written a section of code for my website and i have been trying to get it to work but whatever i try it will not work Here is the code [CODE]$upgrade_user = mysql_query("SELECT * FROM user_info WHERE id='$id'"); while($row = mysql_fetch_array($upgrade_user)){ $real_balance = $row["$balance"]; $real_rank = $row["$rank"]; …

Member Avatar for cwarn23
0
100
Member Avatar for MichaelBerh

I am trying to make my website display a different header depending on the page. If the page is 'index.php', it should include 'index-header.php'. If it isn't 'index.php', then it should include 'page-header.php'. So far, I have the following code: [CODE] <?php if($_SERVER[SCRIPT_NAME] == '/index.php'){include (index-header.php);} else { include ('page-header.php'); …

Member Avatar for cwarn23
0
162
Member Avatar for katisss

I have to find a cost optimal solution for staying on campsites. It is kind of weigthed interval scheduling with a given number of intervals (nights). I wonder how to tackle it, dynamic programmic will work for cost optimizatation gernerally but how to build in the restriction on the number …

Member Avatar for katisss
0
136
Member Avatar for a.muqeet khan

[CODE]// algo assignment.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int DATA[5]; DATA[0]=0; DATA[1]=10; DATA[2]=80; DATA[3]=1; DATA[4]=5; int a;int temp; int i,j; for (i=0;i<5;i++) { temp=DATA[i]; // at starting it means that it has value …

Member Avatar for a.muqeet khan
0
223
Member Avatar for x38class

Is there an element of the treeview object that will hold the original path & can be recalled later without it being shown in the tree. If I only had one treeview I would not have a problem, I have several on the form & all use common sub/functions in …

Member Avatar for Teme64
0
507
Member Avatar for Zssffssz

ok from all of my questions you can probably tell I'm working on something. I want a file to open my program when it is double clicked on (ex .txt opens notepad) I know how to modify the registry n stuff what I need is how to make my program …

Member Avatar for Zssffssz
0
154

The End.