132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Mona..

Hi everybody.. I have a homework on 2-Dimentional arrays, I have to creat a class and pass the parameters int it, i have to overload operators( +, -, *, << ) how do I Add the matrices?? Subtract?? and Multiply them using operator?? what should I pass and what should …

Software Development c++
Member Avatar for Mona..
0
184
Member Avatar for woojungkyu

What is the best algorithm for finding the number of integers divisible by X? I can easily do a: [code]for(num=1;num<maxRange;num++) { int result = 0; if(num%Y==0) { result++; } }[/code] but what if the maxRange is a really huge number (say a 9 or 10 digit number)? I need something …

Software Development algorithm java
Member Avatar for hfx642
0
167
Member Avatar for Sunshine2011

Hello, I wrote a little program (Create a vector and give it back via pointer.) for a better understanding of pointers. First it works but when I would like get access to the vector alloacated with "new", problems occur. For example saving a element is not possible. [ICODE] #include <iostream> …

Software Development c++
Member Avatar for Fbody
0
237
Member Avatar for hemj

Hi, I have to write a program which makes changes and writes to a different text file. The point at which I am stuck is that I am unable to add the value 10 to ASCII value of each of the first 6 characters in the file. Can someone tell …

Software Development c++
Member Avatar for Fbody
0
2K
Member Avatar for ljvasil

Hi all, I'm working on this problem where I want to get a dictionary list of all tree species with the count. That part has been worked out. With in the for loop for tree species, I also want to get the sum of DBH (diameter breast height) for each …

Software Development python
Member Avatar for TrustyTony
0
175
Member Avatar for geeksforgeek

hello daniweb... i got my head struck with the code, and unable to understand the output.please help.. [CODE] int main(void) { float i=3.3; if(i < 3.3) printf("hy"); else printf("bye"); return 0; } [/CODE] output should by bye as 3.3 < 3.3 condition false , but why it is printing hy. …

Software Development c
Member Avatar for Narue
0
145
Member Avatar for linx_mt

Hello, I am so frustrated as I search the internet and cannot find solution for what I want to do... I want my C or C++ code be able to create a file in a directory under "C:\Program Files", for example "C:\Program Files\abc\xyz.txt". This usually triggers a security confirmation like …

Software Development c++ windows-vista
Member Avatar for linx_mt
0
299
Member Avatar for Awah Mohamed

Hi guys, how are you all?? I want your help in writing and auto run code. I mean, a code in c++ that auto runs my c++ based applications so that when ever the pc starts, my programs start as well. How can i build it?? I have been programming …

Software Development c++
Member Avatar for Awah Mohamed
0
293
Member Avatar for falconmick

I was curious as to why the C++ standards board/the guy who made C++ decided to make all non default constructors non explicit? Stroustrup said that with C you shoot yourself in the foot, but with C++ you blow your foot off... Why didn't they make all non default constructors …

Software Development c++
Member Avatar for mike_2000_17
0
830
Member Avatar for JakeA

hi! i am new to objective c programming. i am making a quiz application. i have a home screen which options like: view instructions and start quiz. how can i display another view when i click a button. like, i want to display the instruction screen when i click instructions. …

Software Development display objective-c
Member Avatar for TPBarnett
0
157
Member Avatar for JuloF26

Hi guys! I want to start learning Objective-C and Id like to use c++ streams, problem is that it is causing error on this hello world example: [CODE] #import <iostream> #import <windows.h> int main( int argc, const char *argv[] ) { std::cout<<"Hello World"<<std::endl; Sleep(5000); return 0; } [/CODE] and these …

Software Development c++ objective-c
Member Avatar for TPBarnett
0
624
Member Avatar for Alvi89

This is a part of the code not working properly, i first converted an array integer (containing a binary value) to an integer and convert it into an octal value: here is the code: Note: this section of code does not give an output at all. [CODE]/**************************************** CONVERSION FROM DECIMAL …

Software Development c
Member Avatar for Panathinaikos22
0
107
Member Avatar for sunn shine

can any 1 tel me the site , from where i can install this? recently some thing went wrong with my computer and i lost my evry thng... :(

Software Development c++
Member Avatar for Narue
0
202
Member Avatar for mohamed moamen

I did a program that connecting to database then show data and user can ( add or remove or update ) data but my problem that program take a little time to be ready how i can know that time and make notification for user to use program now or …

Software Development java
Member Avatar for mohamed moamen
0
444
Member Avatar for XodoX

I read that you can use a while loop to read the input from a text file and create a doubly linked list? How do I do that? I would appreciate if someone could show me. Thank you!

Software Development c++ linked-list
Member Avatar for EskayJoe
0
1K
Member Avatar for Tenjune

I'm testing this sample fast food chain program and my problem is every time I select the order the resulting price is like Php895764796364227741000000000000000.0000 Here's the code: [CODE] #include<stdio.h> main() { int choice; float TP; clrscr(); printf("Welcome to Greenwich!\n\n"); printf("This is our menu:\n"); printf("1. Overloaded Pizzas\n"); printf("2. Extreme Cheese Overload\n"); …

Software Development c
Member Avatar for YAMNA MIDHAT
0
116
Member Avatar for Zvjezdan23

In my math programming class I have an assignment to find the slope intercept formula (y2 - y1) / (x2 - x1) which is the m of the formula y = mx + b. I have to find 2 slope intercept equations and make an if-statement or multiple if-statements to …

Software Development algorithm c++ visual-studio
Member Avatar for Fbody
0
319
Member Avatar for dinilkarun

I am encountering the error attached "UnicodeEncodeError: ASCII codec can't encode character u'\0152' in position 124: ordinal not in range(128)" Please help me solve this.....

Software Development python
Member Avatar for JoshuaBurleson
0
167
Member Avatar for RVVW
Member Avatar for ibneazeez
0
91
Member Avatar for alone882

Hi, I have created web browser that surf to the internet through proxy and now I need to create a browser that surf to internet via proxy authentication server (server required enter username and password) and I dont know how to begin program... :/ Maybe something has a small example …

Member Avatar for alone882
0
707
Member Avatar for saravinuya

Can someone help me with my program. I have the code but there are some logical errors. The program should contain 100 numbers that have a menu, first the user should input a number then the menu will show: 1. it adds again a number, 2. it displays all the …

Software Development c
Member Avatar for dev90
0
365
Member Avatar for ntrncx

I do an exercise and i wrote this code to test templates [CODE]#include <iostream> #include "Date.h" #include "Time.h" using namespace std; template <typename T> bool compare(T first,T second){ if (first==second) return true; else return false; } template <class T,class X> bool compare(T first,X second){ if (first==second) return true; else return …

Software Development c++
Member Avatar for ntrncx
0
223
Member Avatar for compzets

[CODE]#include<stdio.h> int main() { int n,i,c=0; printf("\nEnter a no:"); scanf("%d",&n); for(i=1;i<n;i++) { if(n%i==0) { c=c+i; } } if(n==c) printf("\nPerfect no."); else printf("\nNot a perfect no."); }[/CODE]

Software Development c c# c++ mathematics
Member Avatar for cse.avinash
0
194
Member Avatar for roycy

so I need the answer of this qustion : write program in java to creat array from ten integer and count the number of negtive and positive and zero 45,82,-1,35,-4,0,-8,0,9,-11?

Software Development java
Member Avatar for peter_budo
0
51
Member Avatar for jbvincennes

Hi, I find classes sources on the web that import import org.dyno.visual.swing.layouts.Constraints; import org.dyno.visual.swing.layouts.GroupLayout; import org.dyno.visual.swing.layouts.Leading; But I cannot find this package with google searches. Where is it? Many thanks for your help.

Software Development java java-swing
Member Avatar for jbvincennes
0
527
Member Avatar for xploxstriker

I've just started Python and need to write a program that tells if a string is a palindrome. Here is what I have so far. [CODE] def palp(word): if len(word) < 2: return True left_index = (0) right_index = len(word) - 1 while len(left_index) <> len(right_index): return False if left_index …

Software Development mathematics python
Member Avatar for snippsat
0
592
Member Avatar for siva28

i need code for vb.net 2008. That is invoice system i have number in each invoice. my database invoice number is null. when i click tab automatically invoice number increased number 1 ( EC000 to EC001). I used tab control . please reply...

Software Development vb.net
Member Avatar for siva28
0
373
Member Avatar for andimiami

Hello! I am a student (obviously, haha), and I am confused about how I need to do something in my driver class. I have a text file that I am reading in, then I decided to use a string tokenizer to parse the data. Now, I need to store the …

Software Development apple java
Member Avatar for andimiami
0
198
Member Avatar for lAmoebal

I need to create a basic program for work that utilizes the snmpget command. It needs to be usable in both windows and solaris as our clients use both. What's the best snmp library to use? I tried to download a number of them but I can't even get the …

Software Development c++
Member Avatar for vijayan121
0
4K
Member Avatar for ratatat

help guys, this code tells me that the sleep identifier is not found. has anyone got an idea on how to resolve this?

Software Development c++
Member Avatar for ratatat
0
82
Member Avatar for James19142

in this program i'm writing, i seem to keep getting rounded down values. At first i though it was because i was declaring my return variable as an integer so i made sure i wasnt doing that and changed all number variables in the class to doubles to ensure i …

Software Development c++
Member Avatar for Fbody
0
161
Member Avatar for pepyrs

Hello guyz, First of all, sorry for starting new thread with similar topic but I read each and still can't figure out how to do it. I'm having a database, using GridView I retrieve the data into my WEB application. Then I set the rows to editable (not sure if …

Software Development asp.net vb.net visual-studio
Member Avatar for jbisono
0
126
Member Avatar for alexander1s

am writing a program that will count the votes for those whom are agree and desagreed, so i would have Yes and no, now i have to have a file in wordpad, in other to import the information that was saved, to make the program to run, but i have …

Software Development c++
Member Avatar for James19142
0
130
Member Avatar for vmc

I have done most of the code but am struggling with one bit now, please help The brief is Write a class named Month. The class should have an int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, …

Software Development java
Member Avatar for JamesCherrill
0
2K
Member Avatar for guidely

Hi, I have problem passing array from main to another function Here is my code [CODE] #include <stdio.h> #include <string.h> # define Line_size 200 int processing(int lineCount, char harbour[Line_size][Line_size]) { int i; for(i=0;i<lineCount;i++) { printf("%s", harbour[i]); } } int main ( void ) { static const char filename[] = "data.txt"; …

Software Development c
Member Avatar for guidely
0
289
Member Avatar for akemi3

Hello, I'm currently taking AP Computer Science with no prior experience with programming and I am facing a bit of a problem with the last problem on my programming assignment. You see, what I have to do is write a program that displays a name four times either horizontally or …

Software Development data-science java
Member Avatar for akemi3
0
99
Member Avatar for knight fyre

I'm trying to learn Java Servlets on my own but I'm having some very basic problems. The code [CODE]"import javax.servlet.ServletException;"[/CODE] produces a compiler error, "the import javax.servlet cannot be resolved". I'm using version 3.2.2. Why am I having this problem?

Software Development java
Member Avatar for varun.x.anand
0
625
Member Avatar for Zvjezdan23

This is code for the algebraic slope formula (y2 - y1) / (x2 - x1). I need help. My error is: Uninitialized variable formula2 is being used without being initialized. Can anyone help me??? [CODE]#include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { int formula1[2]; …

Software Development algorithm c++
Member Avatar for Fbody
0
111
Member Avatar for vmc

I have done most of the code but am struggling a bit now, please help The brief is Write a class named Month. The class should have an int field named monthNumber that holds the number of the month. For example, January would be 1, February would be 2, and …

Software Development java
Member Avatar for JamesCherrill
0
195
Member Avatar for virendra_sharma

Hi frnz , i need a code for 2^n and suppose user enter n = 4 , so the output will be 16 . Now whatever output we will get i need sum of numbers in that output e.g here we have 16 i.e 1 + 6 = 7 . …

Software Development c
Member Avatar for Mouche
0
136
Member Avatar for romz

Good Day to all, Can anyone give me an idea on how I can select an item in ListView using Right Click mouse button? Any insight would be great. Thanks

Software Development listview visual-basic
Member Avatar for romz
0
179
Member Avatar for hiimhenryyy

Hi, This is my first post here at DaniWeb. I've been using it as a resource through out my assignments. I am truly eager to learn C++, but I've gotten stuck. All I am trying to do is average an array of numbers, but I haven't been able to even …

Software Development c++
Member Avatar for MonsieurPointer
0
177
Member Avatar for sugantha

hello friends, I am doing a bank management system project where I have to conect a database done in MS Access(.mdb extension) to the C++ code...I ve never learnt much about databases and this is the first time I m using Access...so I d be grateful if anyone could explain …

Software Development c++
Member Avatar for Ancient Dragon
0
6K
Member Avatar for ranashok

hi,i have a three columns in empty datagridview to get a input from user.i had a doubt to create a new row after entering the values in those previous cells

Software Development vb.net
Member Avatar for Eternal Newbie
0
224
Member Avatar for vedro-compota

Hi there) Guys , as I understand - this is c++ code = [CODE]int WINAPI WinMain(HINSTANCE hInst,HINSTANCE,LPSTR,int ss) { /* создаем и регистрируем класс главного окна */ WNDCLASS wc; wc.style=0; wc.lpfnWndProc=MainWinProc; wc.cbClsExtra=wc.cbWndExtra=0; wc.hInstance=hInst; wc.hIcon=NULL; wc.hCursor=NULL; wc.hbrBackground=(HBRUSH)(COLOR_WINDOW+1); wc.lpszMenuName=NULL; wc.lpszClassName="Example 4 MainWnd Class"; if (!RegisterClass(&wc)) return FALSE;[/CODE] but tell me please - …

Software Development api c
Member Avatar for vedro-compota
0
338
Member Avatar for sidyusuf

Hi Frnds, i have four comboboxs that are dependant on each other selection.Its working fine but but what i want is to show "select an item" on zero selectedindex of each combobbox when form load.How can i do that???????what i have done is like as: [CODE]Private Sub Form2_Load(ByVal sender As …

Software Development vb.net
Member Avatar for Pgmer
0
338
Member Avatar for terey

[CODE]#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char ch; do{ cout<<"press Q or q to quit,press any key to continue : "; cin.get(ch); cin.ignore(); if(ch!='Q'&&ch!='q') cout<<" you want to continue?\n"; else cout<<"you press q to quit "; }while(ch!='Q'&&ch!='q'); ; system("pause>NULL"); return 0; }[/CODE] my …

Software Development c++
Member Avatar for gyme20
0
95
Member Avatar for jackyxman

Dear All, Pls. help me I have insert data to MS.Access and re-load data to DataGridView, it's always do at LoadAllData() but some time datagridview is not refresh. [CODE]Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\EmployeeDB\EmployeeDB.mdb;User Id=;Password=;" Dim conn …

Member Avatar for Pgmer
0
1K
Member Avatar for cyberdaemon
Member Avatar for cyberdaemon
0
66
Member Avatar for TigerTeck

[CODE]public class CashRegister { public CashRegister() { purchase = 0; payment = 0; } public void recordPuchase(double amount) { purchase = purchase + amount; } public void enterPayment(int dollars, int quarters, int dimes, int nickels, int pennies) { payment = dollars + quarters* QUARTER_VALUE + dimes*DIME_VALUE + nickels*NICKEL_VALUE + pennies*PENNY_VALUE; …

Software Development java
Member Avatar for JamesCherrill
0
136

The End.