199,114 Archived Topics
Remove Filter ![]() | |
Hi, :?: any one please can tell me what iam doing worng ? what iam trying to do is that to make program to create small database with following option add, delete , show ,edit search but i need to have them in it´s own source code so. what iam … | |
Plz look at this code [code]#include<iostream.h> int x=0; int main() { int x=1; { int x=2; cout<<::x; cout<<x; } return 0; }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][co[u][/u]de][/co[u][/u]de][/url] tags >> does anybody know how can i access main local variable x, from inside the block, without using pointers or references? | |
Okay Ive made a bunch of single use calculator programs (one for addition, subtraction, mutiplication, and division). Addition Code [CODE]#include <iostream> using namespace std; int main() { cout << "Please enter 2 numbers to be added "; int a; int b; cin >> a; cout << "\n num1: " << … | |
People i am in trouble :sad: whenever i run any c++ program which i have written, the computer shows this error: :mad: General Protection Exception 0x3DCF:0x1E0B program(1) 0x3DCF:0x1E0B Processor Fault I use Turbo C++ 4.5 (i am only a 16-year old school student) this is one of my codes (all … | |
hi people, i have encountered this error message "unclosed character literal" while compiling the below program using bluej. I wonder what is wrong with the code,do enlighten me. Thanks!! public class Address { private String street; private String city; private String zip; private String state; //Default constructor public Address ( … | |
[CODE]#include<iostream.h> int main() { enum flag{ x=1,y=2,z=4,e=8}; flag f2=flag(99); // out of range return 0; }[/CODE] In this code the range of flag is 0:15 but it still compiles when 99 is entered which is out of range!! | |
What is the code for converting from binary to decimal???????? :rolleyes: | |
[url="http://www.google.com/press/pressrel/codejamwinners_2005.html"]http://www.google.com/press/pressrel/codejamwinners_2005.html[/url] [QUOTE]The competition, which began August 22, attracted 14,500 participants from more than 32 countries. All entrants participated in an initial qualification round with 500 progressing to the second round. The top 100 scorers from round two were brought to Google for the finals. Programming in the competition can be … | |
CAN ANYONE EXPLAIN THE OUTPUT OF THESE PROGRAMS: [code] /* Explain the output*/ #include<stdio.h> int main() { if(printf(5+"Good")>0) printf("morning"); return(0); } [/code] [code] /*Debuh as per i/p o/p*/ #include<stdio.h> int main() { long steps,fval,bstp,cnt1; int num,unit,box[2][13],cnt2,cnt3,cnt4; printf("Enter number:"); scanf("%d",&num); num=num<1?1:num>12?num:12; for(steps=1;cnt1=2;cnt1<=num;steps *= cnt1++); for(cnt1=1;cnt1<=steps;cnt1++) { for(cnt2=1;cnt2<=num;cnt2++) box[0][cnt2]=cnt2; for(fval=steps;bstp=cnt1;cnt2=1;cnt2<num;cnt2++) { if(bstp=0) … | |
Ok, so in a part of my app i need the user to be able to specify a time to cound down form then when the time is hit. it fires an event. i have all that. the problem is i want to be able to see the time ticking … | |
yeah im making this script that is basically a poll and then the administrator can add, edit, and delete questions. Right now i'm just getting the pages to work and such. Only, the session_register($logged_in_user) doesnt remember that variable when it gets to ?page=1 or any page for that matter. Code … | |
hi all i have installed jdk1.5.0 in gentoo linux and having the following problem can any one help me out what should be done i had just installed gentoo. i am not able to set a java heap size of more than 2600m on these machines. I m getting following … | |
Hello! I'm a total dummy when it comes to programming, and now I have a heck of a data extracing job to do for my graduation thesis :cry: Hopefully somebody can help me in the right direction here, because a whole day of surfing didn't get me to the right … | |
I have a very large web page - over 7000 lines (which will not be going on the internet). An introduction consisting of music and graphics starts when the page is opened. The graphics are synchronized with the music. [U]Problem[/U] The introduction works fine each time the page opens except … | |
Hello all i am in need of some help with a datatier layout. I understand the gui, bussinessRules, but i am really not making any progress on the data tier. i have been tring to get a grip on the this one for over a week. I completely understand the … | |
My program is suppose to read in numbers and tokens. However, it will only read in the first number and go into a loop. Never reads the next number or does the computations. Can't figure out what's wrong. [code] #include <iostream> #include <string> #include <iomanip> #include <fstream> #include <cmath> #include … | |
Plz See [code] #include<stdio.h> #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0])) int array[] = {23,34,12,17,204,99,16}; int main() { if(-1<= (TOTAL_ELEMENTS-2) ) printf("%s","gotcha\n"); else printf("%s","oops\n"); return 0; } [/code] why is it printing oops | |
From where can i find the header file unistd.h...one of my program requires it | |
Hi i'm a C++ Noob, i'm trying to write a c++ function to listen for snmp traffic and send back some variables to the source. i'm not 100% sure of what i'm doing :o i'm including Wsnmp.h and also linking to Wsnmp32.lib from within visual c++ however it doesn't recognise … | |
Dear all, I'm developing an SNMP manager using WinSNMP API. While starting up the SNMP by calling the function SnmpStartup, it returns SNMPAPI_SUCCESS, but strangely the 5 output parameters are not defined after the function is executed. Is this normal? Why is this happenning? What should I do? Regards, Alan … | |
Hi everyone, I have got this code` [code]//---------------------------------------------------- #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]) { start: ofstream examplefile ("example.txt"); examplefile<<""; const int SIZE = 100; char msg[SIZE]; cin.getline(msg,SIZE); examplefile << msg; examplefile.close(); cin.get(); system("cls"); goto start; return 0; } //--------------------------------------------------------[/code] And when … | |
i'm having a little trouble grasping the concept of this. If someone could help it would be great. Its part of my assignment...no i don't want u to do it for i just need help. 1. declare an ofstream foutput in main function 2. open a file in main function … | |
Maybe this is the wrong thread but once in a while I stumble across a tool that makes life so much easier that keeping it to myself seems pointless. If you work with web related code, or conventional code, or even many of the other app formats available then keeping … | |
I keep getting this error message and the code below: I can't figure out why any help would be appreciated. Line 51 is this statement in my code: Element* Stack::Element::Prev(void) error message: [code] In file included from Stack03.cpp:28: Stack03.h:81:7: warning: no newline at end of file Stack03.cpp:51: syntax error before … | |
hey, um i was wondering if anyone could help me with a program where if the user inputs a number no more than 5 digits and the program tells you how many times the number 2 appears in that number. i know that the modulus and division have to be … | |
I have a doubt regarding constructor in this program-- [CODE]include<iostream.h> class A { private: int a; float b; A(int j) { a=j; cout<<"\n a is"<<a; } public: A() { cout<<"\n Default constructor invoked\n"; a++; b=0; } A(int j,float i) { a=j; b=i; cout<<"\n value"<<a<<"and"<<b<<endl; } public: void show() { int … | |
I have 3 text boxes and one command button on this form. Users are supposed to input something into text1 and text2 and click the command button for text3 to show the results. However I would like the programme to consider the values of text1 and text2 and based the … | |
I was wondering if it was possible for me to write a simple program that either lets you use command prompt with visual basic (i.e. press a button and it does a command in CMD) if it can't be done in VB is there any other programming languages that allow … | |
I know pictures can be added to picture boxes and backgrounds by using the "Properties" and adding something to "Picture". But I want to know how I can actually get the program to display an animation or picture say, after inputting something into an inputbox, or say after a particular … | |
Hi Everybody! I'm trying to run the following script but I get this error: Parse error: parse error, unexpected $ in c:\phpdev5\www\public\in.php on line 51 Any help would be appreciated. Here are the files: in.php (where the error is coming form): [PHP]<html> <head> <title>CinnaHost Login</title> </head> <body bgcolor="#3366FF"> <center><h1><font color="#FFFFFF">Uploading...</font></h1> … | |
Hi Everyone, Is there a way to make your own remote connection program (just for my use - at least fo now)? Something like goToMyPC. Any suggestions would be appreciated. Also, is this easier to do in Java/HTML? Thanks in advanced. | |
Hi... This is my first thread on this forum. I am on my final semester to be a computer engineer... Yet I can't decide a software project for my graduation, I am looking for briliant ideas with some details about acheiving them.. I am so in need for help... I … | |
OK, I've been banging my head against a wall for a few hours. And I need some sleep. Can someone please show my how to accept input and keep count of it so I can send WriteBytes2() the address of the buffer and the number of bytes entered? Here is … | |
Hello Can some one please explain what this statement is I am very new to C++ and VC++ statement sprintf(DirString,"%s/cl_log.csv",DirName); I could not understand what second argument Thanks in advance, Durga | |
Is there a snippet of code that will stop the cd rom drive from being opened. if so what is it. | |
Hello, I am having a problem with adding a row to my DataSet. I think I know what the problem is, but not how to correct it. I have several bound text boxes that fill from the DataSet. The first column is a numeric and the next several are text … | |
[B]Python and the JPEG Image File, Part 1, The Header[/B] [B]Intro[/B] The JPEG image file format (.jpg) is very popular on the internet because you can pack a lot of picture information into a relatively small file. There are competing file formats like GIF and PNG. GIF is rather limited … | |
Sir, I want to multiply a 2-D array of size 100 by 100 a[100] * b[100]; or a[100][100]; What is the way to multiply the two arrays. Ashwin Perti | |
:mrgreen: I've just started learning and doing examples out of the book but I wanted to see if I could actually make something besides just copying stuff out of a book. So I tried to make an addition calculator. This isnt the entire source code but just a few snippets … | |
Can anyone help us out in this dept, everytime I go through my program when it terminates I get the famous windows: "main.exe has encountered a problem and needs to close. We are sorry for the inconvencience ........ Debug, Send Error Report, Don't Send Yep that one... Can anyone offer … | |
Hi all, I want to begin programming in either Java1 or Java2 (probably Java2 as it is the more recent). Are there any free Java2 compilers on the internet (like the Bloodshed C++ compiler) I could download? Thanks | |
Hi Everyone, Is there a way to make your own remote connection program (just for my use - at least fo now)? Something like goToMyPC. Any suggestions would be appreciated. Also, is this easier to do in Java/PHP? Thanks in advanced. PS: If anybody knows of a tutorial, that would … | |
This is begining to bug me. I have googled it. I have searched this site and I still have not managed to get the rounding to work the way I want! I have done the Math::Round() deal, I have tried System::Math::Round. I got desperate and looked to see what it … | |
What's the point of a struct? I mean, isn't it basically the same thing as a class? So what it's used for? | |
heya folks. i'm working on an chunk of code here and i don't really understand what i am doing wrong in trying to increment and decrement a fraction. if you could provide some insight i would appreciate it. thanks. [CODE]#include <iostream.h> #include "fraction.h" void main( ) { Positive_Fraction a,b,c; int … | |
Hello. First off, let me say that if this has been brought up before I apologize. I'm currently a junior at the University of Colorado and am majoring in CS with a minor in business. I was an ECE major and switched to CS due to the fact that I … | |
i want to start the image processing in c language.but i m unable to load the any image(bmp,jpg,tif etc) in c file. any one can help me? thanking you | |
Hello everyone out there, see the thing is that I just built my Tic Tac Toe and I want to add some color to my table, its not an assigment or anything I just want to make my different from the other kids in my class, thanks everyone :) :) … | |
hi i need to use serial port to transfer data from RFID tag to a computer. i already have these functions but i donno how to call them. please help me to call the functions so that i can use them to download data from RFID tag to computer (into … | |
hi , i had a problem with one of my programs im pretty sure everything is correct but when i run it it only asks me to input the last name but it would just print out the rest and not ask for any other input why is that? can … |
The End.