199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for geeksforgeek

explain the output:-- [CODE] int main(void) { int a=10,b; a=a+b-(b=a); printf("%d",a); } [/CODE] I am not understanding it. the precedence of bracket() is greater so b is assigned to a so expression becomes- a=a+a-a which should be equal to a but it is not why?

Member Avatar for geeksforgeek
0
204
Member Avatar for bbizzl

Hey All, Been banging my head into the wall on this one. I have 2 tables one for users 'myMembers' and one for products 'products'. Each table has a auto increment id. The myMembers id is the user id and the products table id is for the product id. I …

Member Avatar for chrishea
0
219
Member Avatar for sidyusuf

hi frnds, i have a certain application in vs2008 with several windows forms.my question is that i have to mention connectionstring on each n every form as: [CODE]con.ConnectionString = "Data Source=mypc;Initial Catalog=Main;User ID=me;Password=pwd"[/CODE] Is there any way to define connectionstring for once for all forms and and one more thing …

Member Avatar for Netcode
0
116
Member Avatar for ayeshashahid

i need help on comparative analysis of waterfall,prototype and agile methodologies.give me some instructions how should i do it.i have to write a 3000 words essay on this topic.what points should i keep in mind while writing it

Member Avatar for Taywin
0
105
Member Avatar for phorce

Hello, I am working on an algorithm that checks to see if a value is in an array, however, it doesn't seem to want to work .. It will display that the first number is there but nothing else.. Any ideas? Heres the code: [code] #include <iostream> using namespace std; …

Member Avatar for gerard4143
0
335
Member Avatar for sergent

Any decompiler/debugger can convert machine program written in C/C++ to Assembly, but that Assembly is really hard to read, and corresponds to each particular instruction in machine language, not to a C/C++ instruction. So my question: is there a decompiler, that decomplies the C source code to Assembly, not to …

Member Avatar for GunnerInc
0
134
Member Avatar for cesione

I want to write a program to count the number of occurances of a substring in a main string. am having trouble with this please i need help. my code is below, you can show be a better way to write it and tell me were i went wrong. am …

Member Avatar for cesione
0
219
Member Avatar for Xoteo

Greetings, Originally, I graduated from college with a Computer Programmer degree; later I went on to university to pursue a bachelors in computer science. Unfortunately, when I had completed my studies, the requirement for that type of knowledge in my area had gone from great to almost nil. We coders …

Member Avatar for pseudorandom21
0
101
Member Avatar for Joshua Kidd

Hello, I have created a login page for my users. And it seems to not be working properly. [CODE] <?php include "inc/header.php"; ?> <div class="ContentHold"> <?php include "inc/globals.php"; if (isset($_POST['login'])) { $username = addslashes(strip_tags($_POST['username'])); $password = addslashes(strip_tags($_POST['password'])); if (!$username||!$password) { ?> <div id="NotifyUI"> Please Enter a Username and Password. </div> …

Member Avatar for Joshua Kidd
0
184
Member Avatar for scobi

[CODE] #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <glut.h> #include <stdio.h> void drawCube(); float vertices [8][3]; int facets [6][4]; void read_file (char **argv); void init(void) { glClearColor (0.0, 0.0, 0.0, 0.0); glShadeModel (GL_FLAT); } void display(void) { glClear(GL_COLOR_BUFFER_BIT); drawCube(); glEnd(); glFlush(); glutSwapBuffers(); } void reshape (int w, int h) { …

Member Avatar for scobi
0
169
Member Avatar for blt007

Ive been having trouble solving this please help, yea its hw but im using this as a last resort as its due in 2 hours. [CODE] // Search a dictionary file for the word input by the user. // //////////////////////////////////////… #include<iostream> #include<string> #include<fstream> using namespace std; int main() { string …

Member Avatar for blt007
0
630
Member Avatar for cdea06

So I'm trying to add a while loop so that the program continues to ask for the user to enter a new string phrase after the previous one is counted until the user enters the phrase "quit". However, for some reason if you enter anything but "quit" it just produces …

Member Avatar for Taywin
0
225
Member Avatar for NICEGUY123

Input file looks like this BASKETBALL John Smith 23 , 54 FOOTBALL Jose Cruise 445, 23 BASKETBALL KJ 34, 32 BASEBALL Mike Beterman 3, 2 FOOTBALL David Smith 323, 23 Below is my code. What is happening on my output I get Sport: BASKETBALL Name: John Smith Stat: 23 , …

Member Avatar for Taywin
0
378
Member Avatar for bentom123

Hi, I currently have a form with about 20 textboxes on, labeled Textbox1, Textbox2 and so on... I would like to know how to get the data from any one of these textboxes from an integer. [CODE] Dim text as String text = "Textbox" & RandomInteger & ".Text" msgbox(text) [/CODE] …

Member Avatar for Unhnd_Exception
0
3K
Member Avatar for Kaskito

Hi there! So, I have this exercise to do in my classes and I've reached a part in my model that confuses me (due to the text). I've tried some approaches but I can't seem to find the solution. I've also tried to ask 3 teachers, but they all say …

Member Avatar for smantscheff
0
621
Member Avatar for rushi3311

Here i have four tables in my Database named "test_center" those are 1) "test_user" --> PK = u_id 2) "test_metadata" --> PK = test_id 3) "student_detail" --> PK = Student_id 4) "test_records" --> PK = test_record_id (Child table) table 4 is child table and 1,2,3 are masters..! i am trying …

Member Avatar for smantscheff
0
264
Member Avatar for marvolo1300

[CODE] int a [0] = int b [1]; [/CODE] I get this error. [QUOTE]Type mismatch: cannot convert from int to int[][/QUOTE]

Member Avatar for marvolo1300
0
136
Member Avatar for Ich bin würdig

Can someone tell me what's wrong with my syntax.. THanks [CODE] #include<stdio.h> #include<conio.h> void FACTORIAL(int factorial=1, int N) {int y; {for(y==1;y<=N;y++) factorial=factorial*y; printf("The factorial of %d is %d", N,factorial);} } void main() {clrscr(); printf("Please enter a no."); scanf("%d",&N); FACTORIAL(factorial=1,N); getch(); } [/CODE]

Member Avatar for Narue
0
107
Member Avatar for bpacheco1227

I need to sort three numbers that are entered in three different textboxes and display these numbers ascending and when I press a different button display them descending. Now I think that I need to put these three numbers into an array, sort and display, but I'm not really too …

Member Avatar for Muhammad Faruqi
0
3K
Member Avatar for malikmm

Hi, Firstly, I must apologise as I am a novice and my approach may be flawed. I am using MS Visual Web Developer 2010 Express on a Windows 7 Enterprise platform. What I want to do is add a provided 3rd party wsdl file to a C# ASP.NET MVC Web …

Member Avatar for malikmm
0
933
Member Avatar for Tom_Weston

[CODE]#include <iostream> #include <windows.h> #include <string> using namespace std; void main() { string run; cin >> run; ShellExecute(NULL, NULL, run /*<<<the error*/, NULL, NULL, SW_SHOWNORMAL); }[/CODE] I want it so if i enter a file path, it open. If i replace run with "E:/test.exe", it works... but i want it …

Member Avatar for Tom_Weston
0
176
Member Avatar for fesago90

Well, I read that endl 'flushes' the output buffer as opposed to \n. Now what does that mean (In what way could that be useful)?

Member Avatar for seanwalsh1984
0
577
Member Avatar for trejorchest

I'm trying to write the code for the Game of Life program, using arrays and for loops. I based most of my code on what my teacher did in class and modified it to fit the requirements of my assignment. I've hit a wall, though. When I execute the program, …

Member Avatar for trejorchest
0
224
Member Avatar for hladdha.bhl2009

I am Making A program for malking a phonebook. for that i am storing a list in dictionary. Like this: [code] phbuk={} def add(): a=raw_input('Name :') b=raw_input('Email :') c=raw_input('Mobile :') name=[a,b,c] d=len(phbuk) phbuk[d+1]=name [/code] Now if i want to delete a particular record just by giving name then how can …

Member Avatar for JoshuaBurleson
0
257
Member Avatar for Justinedeleon

My deadlines are running @.@ please help me on how to make a curve fit for this little ballie dude i created. again as a proof of what im doing . can someone help me with this? i need to come up with something like --> ":3" thanks guys. [CODE]import …

Member Avatar for hfx642
0
677
Member Avatar for CKShia

I want to have a real-time validation for the first name & last name to check if user entered the data before submit. Well it's work fine in [COLOR="Red"]Google Chrome[/COLOR]... But in Firefox & Internet Explorer, if user press "Tab" key in [I]"first name"[/I], then the alert message will keep …

Member Avatar for Taywin
0
188
Member Avatar for whiteyoh

Hi all, I need to figure out how to validate the contents of a file. I know how to do it via mime and extension, but i could still upload, for example, a php file that would satisfy those checks. Any ideas? regards paul

Member Avatar for diafol
0
103
Member Avatar for herstein

Hey guys. I am trying to write a programme (not using scanner class) which prints the smallest number in an external text file called README.txt. Anyway I included some explanation of what I am doing so hopefully it's clear. What this programme prints is 0.0, which is not even a …

Member Avatar for JamesCherrill
0
127
Member Avatar for wannas

Hi there, I tried to compile a c++ code but got a fatal error. I should include net/netdb.h into my directory,but i can't find it anywhere. is there any website to download net/netdb.h??

Member Avatar for wannas
0
3K
Member Avatar for swissknife007

[CODE]#include<stdio.h> #include<conio.h> ins(int tree[15],int n,int item) {int ptr,par=0; printf("\nitem here is%d \t\n",item); n=n+1; ptr=n; while(ptr>1) {par=ptr/2; if(item<=tree[par]) {tree[ptr]=item;return;} tree[ptr]=tree[par]; ptr=par; } tree[1]=item; return; } del(int tree[15] ,int n,int item) {int last,right,left,ptr=0; item=tree[1]; last=tree[n]; ptr=1;left=2;right=3; while(right<=n) { if(last>=tree[ptr]) { tree[ptr]=last; return; } if(tree[right]<=tree[left]) { tree[ptr]=tree[left];ptr=left;} else{tree[ptr]=tree[right];ptr=right;} left=2*ptr;right=left+1; } if(left==n&&last<tree[left]) {ptr=left; } …

Member Avatar for swissknife007
0
158
Member Avatar for pradeep_java

How can I store a number with 10^6 digits in Java? Would BigInteger be the most appropriate while considering performance issues like memory and speed

Member Avatar for JamesCherrill
0
1K
Member Avatar for Justinedeleon

Oh. btw admin! sorry about my earlier thread. i promise not to do something like that ever again :) anyway. i was having trouble with my project and its about Multiplication with loops. i started with a few codes and im really frustrated with what im doing now. please let …

Member Avatar for Justinedeleon
0
342
Member Avatar for josko91

hi, i am interested how is possible to work with python from dos and if somebody have some simple example.

Member Avatar for josko91
0
300
Member Avatar for sc0field1

I need to generate 500 random numbers from 200 to 1200 and use insertion to sort them. This is probaly simple for you guys but im confused. My problem is when i run the program all I get is 500 0's. Anyone help me out? [CODE]public class insertion{ public static …

Member Avatar for JamesCherrill
0
123
Member Avatar for rv1990

Please guys will you recommend any books or tutorials for C#? Thank you

Member Avatar for Kekke
0
132
Member Avatar for alinutzu

Hi. I have an bounded datagridview with cell decimal different formating (N2 and N4). If I enter a 4.5265 value to a cell with N2, I formated this to appear 4.53 ... and this is wonderfull. My problem is when I try to save data ... in my sql table …

Member Avatar for alinutzu
0
326
Member Avatar for dangari

My query below has been working okay for 1 year now and suddenly it is giving an exception: [CODE] (SELECT distinct(R.imei),R.mobile,S.msg,S.reply,M.model, left(S.receiveTime,10) as receiveDate, right(S.receiveTime,8) as receiveTime,'' as 'Reason' from dbSAMSUNGmain.tREGDATA R,dbSAMSUNGmain.tMODELS M,dbSAMSUNGmain.tSMS_TRANSACTIONS S where S.mobile=R.mobile and replace(replace(S.msg,'/',''),' ','') LIKE concat('%',R.imei,'%') and (S.reply like '%Registration successful%' || S.reply like '%Reg …

Member Avatar for mickjsn
0
297
Member Avatar for devloper
Member Avatar for devloper
0
168
Member Avatar for davidhk35

I'm up to finish an assignment for my C++, but there must be some thing wrong with the codes.... hope someone will able to give me a hand~ so...here's the title assignment: Program generates a random math problem, dealing with the : addition, subtraction, multiplication, or division of integer values. …

Member Avatar for davidhk35
0
145
Member Avatar for mukulbudania

I have made a grid and want to put text on each text block. can it be like some align command in graphics.. which allows us to align the text in each block... plz help me out with this....

Member Avatar for ravenous
0
112
Member Avatar for skylinedrifter

Hey Fox... i wrote the program for finding the Mean of 4 integers (Thanks to Daniweb members) now im faced to also get the standard deviation of those numbers x=sqrt(X1+X2+X3+X4)/3 here's what i've come up with so far... [CODE]#include <iomanip> #include <iostream> #include <cmath> using namespace std; int main(void) { …

Member Avatar for ravenous
0
1K
Member Avatar for morrisproject

I am using a dreamweaver form, which has some buttons on it. The button id is stored in the database as the conveyor number. When updating records i want to be able to click a button, which will use the button id to call for the correct record in the …

Member Avatar for morrisproject
0
134
Member Avatar for angelineygrubay

need help ... i need to have a java code for the feistel block cipher .. i know you can help me ... ' please .. :p -- thank you in advance /..

Member Avatar for peter_budo
0
166
Member Avatar for xtinawp

Hello, I have just started in a java class and having trouble with first assignment. Our first assignment was to enter into Notepad++ and enter a java program provided to us. I did this and saved the program as Quiz1.java. The next step was to compile the file using the …

Member Avatar for peter_budo
0
1K
Member Avatar for gokhantiknaz

First i apologise for my english. Here is my problem... I got a web browser on my form. i'm navigatin to login page(1. Page). My user name and password comes from code. Then i click to submit button... Then navigating another page(2. page). İn the 2. page there are link. …

Member Avatar for gokhantiknaz
0
723
Member Avatar for rohtash
Member Avatar for Ich bin würdig
0
103
Member Avatar for SmallCucumber

hi,thank you for your attention.:P I am thinking of if there are some thing in php like event or trigger to inform another php file, :idea: that I'v just insert something into the mysql database . thank you for giving me some advices~ :)

Member Avatar for SmallCucumber
0
237
Member Avatar for FBG

I have a problem creating a commentbox in PHP. I've created this commentbox from a simple tutorial and created a database with MySQL and it works fine. The only problem is, the table won't expand when more text than the quantity that can fit on 1 row is send. Instead, …

Member Avatar for jcbphlip
0
252
Member Avatar for nadeemansari

[CODE]<form name="form2" onSubmit="validateForm2()" action="" method="POST"> <table> <tr> <td> <select name="smonth"> <!--some options--> </select></td> <td><input readonly="readonly" name="day" type="text" size="23"></td> </tr> </table> </form> <!--java script code --> function validateForm2() { <!--Things to do--> 1.check if both the fields are empty 2.if condition above is true then display error }[/CODE]

Member Avatar for nadeemansari
0
5K
Member Avatar for aero31aero

Everytime I run this program and enter a new record, it gets terminated on these statements: [CODE] stud.pcent=((stud.mhin+stud.meng+stud.mmat+stud.msci+stud.msst)*100)/(mm.hin+mm.eng+mm.sst+mm.sci+mm.mat); fwrite(&stud,recsize,1,file); [/CODE] The whole program is this. It is only partially complete. [CODE] #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #define UARROW 72 #define DARROW 80 #define ENTER 13 #define ESCAPE 27 int key; …

Member Avatar for aero31aero
0
195

The End.