199,114 Archived Topics
Remove Filter ![]() | |
[[U]I][B]My Doubly linked list doesnt work when i try to display using backward/reverse traversal... Will you please help me....[/B][/I][/U] [IMG]http://www.withfriendship.com/user/images/616/1vijay.jpg[/IMG] | |
Hi, [URL="http://www.webinmind.net/bpc.html#two"][U][COLOR="Red"]Someone told me to use this code to clear the input buffer..[/COLOR][/U] [/URL] [code]while((ch=getchar())!='\n' && ch !=EOF);[/code] But I fail to understand how it actually works. For example, there are two newline characters in the buffer [quote] [B][U]This is my buffer[/U][/B] \n \n [/quote] Now getchar() grabs the first … | |
I have an assignment for school to make a program called the game of life. This program takes values from a data file and places them in a 2d array. All the values taked are set to true in the array and any empty places default to false. Then it … | |
Hi, Can anyone help me in this code bubble sort in c++,,, this is my code.......[CODE]void main() { int A[5]={7,2,10,15,3}; int i,j,swap; for(j=0;j<5;j++) { for(i=0;i<5;i++) { if(A[i]>A[i+1]) { swap=A[i]; A[i]=A[i+1]; A[i+1]=swap; } } } for(i=0;i<5;i++) cout<<A[i]<<endl; }[/CODE] :( | |
[CODE=c] #include <stdio.h> #define M 21 #define N 2 #define INPUTFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\in.dat" #define ARRAYFILE "C:\\Documents and Settings\\Duy Anh Bui\\My Documents\\Uni Stuff\\Eng Computing\\Sourcecodes\\Exercise 2\\array.dat" float Quadratic(float,float,float); //Quadratic Function Prototype int main () // Start main() { float a[M][N] = {0}; // Array a … | |
hi guys, it's been a while since i used c for anything so here goes a question tha may seem silly. I have 2 variable length arrays.... [code=c] int main() { int n = 5; int m = 6; int before[n][m]; int after[n][m]; array_function( 5, 6, before, after ); } … | |
hi all! how can we list all directory as well as file(all hirerchical) in python script by giving the path as input | |
Hello everyone. Welcome to my first post. I have problem, it didn't brough me here, but maybe someone figure it out, I'm staring at this piece of code for hour. I'm trying to make directory listing class. It puts filenames and directories to vectors. It's not finished, yet not working … | |
I know that this is a simple one but never the less I forget how to do it. How do I create white spaces on my screen. Im writting in DEV-C++. I want my output to look something like this Name title pay Sam Uni student shit I know how … | |
Hello, I have a question. I work in visual c++ in a document/view arhitecture (SDI application) and i draw some stuff with some opengl functions (cubes, cylinders) but when i hit the "New" menu from the File menu it doesn't erase or clear my drawing I don't know why. Can … | |
Hello everybody, I am using WAMP: 1. PHP 5.. 2. MySQL 5.. 3. Apache 2.. the collation of my database and tables and fields are 'utf8_persian_ci', and also my query is in this format in PHP: [CODE]mysql_query("SET NAMES utf8"); mysql_query("SET CHARACTER SET utf8"); $query = mysql_query("SELECT * FROM tblName SORT … | |
i need to convert this JApplet program into a JFrame, but dont know how to do it, can anybody help me please? [this is extremly urgent as i need to have this done by tuesday] [code=language] /*Game.java 5.5.08 This program, Game.java, is an educational game that tries to allow the … | |
Hi everyone I need to hand in this assignment today :( Im trying to read from a file and read it onto the screen, my code keeps showing up an error saying 'java.lang.NoSuchMethodError: Main' Here is my code: import java.io.*; import java.awt.*; import java.applet.*; public class Empty_3 extends Applet { … | |
I need to read in text randomly from a text file, so does anybody have code for that? pretend the text file is called CommunityChest.txt i prefer the use of the scanner class or the use of text readers thank you! the text file is included below if anybody needs … | |
Hello every body.............. any one can help me about this program. I want to create a simple program in C++ i want When the program runs they prompt "Enter the Names:" for example: Name1: Abc Name2: Cup Name3: Altavista Name4: Yahoo Name5: Mbni Name6: Sun Name7: Mani Name8: Google Name9: … | |
i have 2 form namely appointment and drug. in the appointment form there is datagrid containing 2 columns namely drugname and quantityused. in the drug form i have 2 textbox namely txtoriginal quantity and txtquantityleft.. my problem is that i want the txtquantityleft takes the originalquantity substract the quantityused column … | |
Hi, i'm using ms access and i have a table and a form which have the field code_url. I would like to know how can i create a form with a button that i could use to cut string in the field name code_url for example: <a href="yahoo.com?234234234sdef">Episode 1</a><br><embed src="videos/vplayer.swf … | |
Hi all, I have two MS-Access Databases. 1.Comp with fields CID, CName, CMarks. 2.Stud with fields SID,SName,SMarks. I use JSP to build the form in NetBeans. I want to create a form which would allow me to choose a CName from a drop down menu. When I submit, it should … | |
Aside from access specifiers (private, public, protected), what differentiates structures and unions from classes in C++? I have been told that in C++, classes and their associated components are instantiated in memory in pretty much random order, but structs and unions are instantiated in a fixed order? Is this true? … | |
okay so I'm not sure how to do this, but suppose i have a struct that looks something like this: struct soundNode{ string identifier; sound new_sound; soundNode* next; soundNode* prev; }; sound is an object that is defined by a .h file. and in my main program, i have a … | |
I want to read file in binary mode using fread() into structure members. following is the code which works perfectly on Turbo C compiler(DOS base) but doesn't work for VC++ 6, it is giving exception at fread() statement. The input to this file we can give any .bmp file name … | |
Hello, I'm trying to use getch several times in my program, but it is remembering earlier key presses. Is there a function or command I can use to clear the getch buffer? Or am is there something else I am doing wrong? Thank you. C. | |
hai. I'm trying to compile a program split up across multiple files. The code is far from complete, but I noticed lots of compiler warnings and errors. This ought to be due to splitting the code up: I thought the preprocessor simply copy and pasted the code into main.c when … | |
Hi The goal is to allow the user the ability to compare daily schedules of between 1 to 7 users. The number of columns/user schedule and column headers are dynamically created base on user selection. Each user schedule is set up in columns with the user name at the top … | |
Hi, I am debugging with gdb a huge program on HP-UX. It has a very strange behaviour and I could not identify the cause. Have a look at this for example: (gdb) c Continuing. Breakpoint 2, CExtract::extractDAT (this=0x80000001007bb9d8, user=@0x80000001004d4670) at Extract.cpp:1761 1761 meas.getSumMethodName ( sCol.meas_sum_method_name ); (gdb) p &meas $9 … | |
Hello, I have a question. I work in visual c++ in a document/view arhitecture (SDI application) and i draw some stuff with some opengl functions (cubes, cylinders) but when i hit the "New" menu from the File menu it doesn't erase or clear my drawing :( I don't know why. … | |
I am reading a file that is about 20 Mb, this will take about 10 seconds. A few lines from this file look like below. The first value is a date value that go from lower to higher and the second value after the "Comma" is a number. In the … | |
Hello. I'm having troubles with my JComboBox calculations. For example, if the strings in my JComboBox were String[] name = { "John", "Tom" }; And Tom was assigned 15% to his name. How can I have the cases in my action performed reach out to a calculation class to perform … | |
I have a Pong game with a level editor (as long as you have the source code) where you can put walls where you want. There are also walls that only balls hit by the player can pass through, walls that only balls hit by the Cpu can pass through, … | |
hey, is this code: [CODE=C++]if(m_velocity.x == 0) return 0; return ToDegrees(atan(m_velocity.y/m_velocity.x));[/CODE] any more efficient than this code: [CODE] if(m_velocity.x == 0) return 0; else return ToDegrees(atan(m_velocity.y/m_velocity.x));[/CODE] I.e., are we saving any time by omitting the else statement? | |
In Xp... I want to access start->run through programatically like when click start ->run-> //192.168.23.5 how i access this run through c??? | |
Hello, Okay I'm stumped and can't figure out why this code chunk isn't working properly (works on square matrixs; everything else doesn't work).... uint8 * imageTranspose( uint8 *im ){ uint8 *im_transpose; int x, y, org_offset, tran_offset; int im_size = dims[0] * dims[1]; if ( (im_transpose = malloc(sizeof(uint16) * im_size)) == … | |
Hey guys, I've came across problem and wondering say if you have a 2 lists called user_list and pass_list and you have a prompt for username and password. Instead of 1 user name and password how could it be for all can be used at the same prompt? heres an … | |
From form1 I m passing the values of two textboxes & on form 2 I m receiving it--- FORM1 CODE- [code=asp]protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("default4.aspx?roll="+TextBox1.Text); Response.Redirect("default4.aspx?name="+TextBox2.Text); }[/code] FORM2 CODE-- [code=asp]protected void Page_Load(object sender, EventArgs e) { Label1.Text = Request.QueryString["roll"].ToString(); Label2.Text = Request.QueryString["name"].ToString(); }[/code] But the error is … | |
If a person composes a short program and hit's F5 or "run" the output will fit on the viewers screen. I have composed a long program for homework purposes, and once I hit F5 or "run" I do not see the WHOLE program output. Only the bottom half. By hitting … | |
Hello! I have just developed, as an assignment , a small conventional website, commonly used for “Log in “purposes. User enters the UserID and password. User ID is compares from the customer Table, to verify, if the name already exists in database. If yes, he is directed to main page. … | |
my string contain "hello baby" and i wanted to find the position of the character 'l' which falls in pos 2 and 3. Using string.find("l") return me the position of first "l" found. How can i do a loop to find the position of my next character 'l' in the … | |
How can i cut out every 4 characters from a text file? Example: my text file rows of binary numbers like: 101010101000010101010111 i wanted to cut out every 4 characters from it becomes: 1010 1010 1000 0101 .... .... ..... i have been bale to cut out the 4 characters … | |
I have a quick question that is been bugging me. [CODE]void swap(void *a, void *b) { void *tmp; tmp = a; a = b; b = tmp; }[/CODE] I wrote this intending it to be either able to swap a structure, or just the data defined within a structure. Will … | |
Hi, I just bought a hp laptop installed with Vista business and I hava installed in it Microsoft Visual C++ 6.0. Initially, I was able to write programs with it but it could not execute the programs. Now, I am even faced with a bigger problem, it cannot open a … | |
![]() | Hi There I have a very simple web gallery in php and mysql. I have noticed upon creating it, that I have several fields in my database contacting the same information (to a certain extent) and I wondered whether this would eventually put a strain on my server. Would it … ![]() |
Newbie question; How do I cast a text file to an array, after the file is read using StreamReader? I have read many threads, code etc but I really need my hand held here, I just dont get it (especially using windows forms)...this is part of an assignment.... I've been … | |
what does the [B]<>[/B] mean in the following GWBASIC programm ? [ICODE]190 FOR C=2 TO N 200 LET I=C-1 210 WHILE I <> 0 220 IF ASN(I)>ASN(I+1) THEN SWAP ASN(I), ASN(I+1) : I=I-1 ELSE I=0 230 WEND 240 NEXT C [/ICODE] ITS BUBBLE SORT IN GWBASIC | |
Hey, I made i looked up toupper and made a little program out of it and have come to a little situation, When i enter the space character " " it does not output what i want and it just closes. [CODE=C++]#include <iostream> using namespace std; int main() { int … | |
Not certain if this is the right place to ask this. I need to get two processes to use the same data. Process 1 reads text files, parses them and creates linked lists (structures).before this process terminates it display all the lists to prove the data has been loaded correctly. … | |
Problem is: I click my submit button it updates the database but not the website content, I click the submit button again and it updates the website content this time. This problem always pops up, and its due to incorrect structure of code in most parts :( I cant seem … | |
Hi people. I was just wondering if I can use _LINE_( by including some header file or so) in devc++ to get the source code line number or _TIMESTAMP_ to get the compile time timestamp. If not is there an alternative? I see compile time errors when I use them … | |
I write code to get most frequent words in the file I won't to implement bigram probability by modifying the code to do the following: How can I get every Token (word) and PreviousToken(Previous word) and frequency and probability From text file and put each one in cell in table … | |
Hi Guys i want to implement iir filter in assembly in c64x processor. preferably fixed point algorithm. Here is the c code of iir filter which i have written. [code=c] #include<stdio.h> void main() { float ip1_seq[10]={1,1,1,1}; float b[10]={0.049,0.074,0.105,0.074,0.049},a[10]={-1.715,1.726,-0.85,0.195}; int len_ip=4,al=5,bl=5; int n,k,i,len_seq=0; float op_seq[10]={0},op1_seq[10]={0},op2_seq[10]={0}; len_seq=al; if(al!=bl) len_seq=(al<bl)?bl:al; if(len_seq!=len_ip) len_seq=(len_seq<len_ip)?len_ip:len_seq; for(i=len_ip;i<len_seq;i++)//padding … | |
Hey, so I'm making a Breakout game in C++ w/ DirectX, and I'm having some trouble thinking of the ball bouncing physics. The way I've made breakout games before was to have the ball only move at 45 degree angles. This was fairly simple. Just reverse the x or y … |
The End.