132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for andrewama

Hi again guys, Im trying to declare SIZE as a constant but i keep getting an error saying C++ forbids declaration of SIZE with no type. Does anybody know how to fix this. it was also giving me an error when i was using the void main command so i …

Software Development c++
Member Avatar for grumpier
0
171
Member Avatar for henks

[code] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main(){ char input[10]; int i,j,digit,out[10],flag=0,sum; while(flag==0){ sum=0; flag=0; strcpy(input," "); scanf("%s",&input); fflush(stdin); digit=strlen(input); printf("%d\n",flag); if(strlen(input)>8){break;} /*else { for(i=0;i<8;i++){ if (input[i]!=48&&input[i]!=49){ flag++; break; } } }*/ printf("%d\n",digit); printf("%d",flag); if (flag==1){break;} for(i=0;i<8;i++){ if(input[i]!='\0'){ if(input[i]=='1'){ out[i]=1;} else if(input[i]=='0'){ out[i]=0;} } } j=1; for(i=0;i<digit;i++){ sum+=out[i]*pow(2,digit-j); j++; } printf("Decimal …

Software Development c
Member Avatar for henks
0
145
Member Avatar for ryeman012

I need to use at least one array in the tic tac toe code shown below and I am not sure how to do it. I am new at this which explains my question. Any help would be greatly appreciated. Public Class MainForm Dim p As Integer Dim pic As …

Software Development vb.net
Member Avatar for timothybard
0
320
Member Avatar for ashish_nirkhe

I am designing a project in java.I am mostly done with the code. I need to know how to convert my java code into .exe file? pls reply soon. Thanks in advance.

Software Development java
Member Avatar for ashish_nirkhe
0
123
Member Avatar for afg_91320

[code] int array1[4], array2[4] = {3, 6, 9, 12}; array1 = array2; [/code] and this one: [code] void showValues (int nums [4][]) { for (rows = 0; rows < 4; rows++) for (cols = 0; cols < 5; cols++) // is this the line of error? cols is not declared …

Software Development c++
Member Avatar for Alex Edwards
0
556
Member Avatar for vladdy191

Given the following function variables declarations in C++: int (*f)(int); int (*g)(int); int (*h)(char); when try to assign f=g its fine but trying to do h=g gives an error with a C++ compiler, can anyone tell me why this is?

Software Development c++
Member Avatar for skatamatic
0
148
Member Avatar for complexcodes

I am trying to write a program that displays a rectangle when user drag the mouse and when user release mouse, it displays the rectangle with green color. I am terribly confused here is what I am thinking to do import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.net.*; public class …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
574
Member Avatar for freudian_slip

For some weird odd reason, sqrt(2/num) does not work. [ICODE] cout << " sqrt(2): " << sqrt(2) << endl; cout << " sqrt(num): " << sqrt(num) << endl; cout << " sqrt(2)/sqrt(num): " << sqrt(2)/sqrt(num) << endl; cout << " sqrt(2/num): " << sqrt(2/num) << endl;[/ICODE] results in [ICODE] sqrt(2): …

Software Development c++
Member Avatar for vmanes
0
149
Member Avatar for Srynx

When I compiler my program I get this warning and when running it a runtime error. The warning is: 128 ... [Warning] passing arg 1 of `MostraPantalla' makes pointer from integer without a cast

Software Development c++
Member Avatar for bonnie1702
0
80
Member Avatar for college.student

[code=cplusplus] #include <cstdlib> #include <iostream> #include "stdafx.h" using namespace std; int main() { char YorN; cout << "This Program Calculates Job Earnings\n\n"; cout << "Would You Like To Use The Pay Calculator Program: "; //With while loop the 2 previous cout statements are not //read cin >> YorN; while ( …

Software Development c++ visual-studio
Member Avatar for vmanes
0
102
Member Avatar for DemonGal711

I have to use stacks for my program, but I've never done them before so I looked up a code in my book to try and help me understand it but parts are confusing me. [code] void push(char item) { if (full()) throw FullStack(); else { NodeType* location; location = …

Software Development c++
Member Avatar for DemonGal711
0
99
Member Avatar for Niner710

Hi, I am trying to parse a txt file in C++. I usually use perl to parse thru text files but need to do it in c++. Here is my text file. [code] NAME BITMAPVBIREFE MESSAGE VirginBitMapiIrefE VCCVALUE 3.000000 VIHSELECT 1 VIHVALUE 3.000000 WPSELECT 1 WPARGSELECT 0 WPVALUE 2.600000 [/code] …

Software Development c++ perl
Member Avatar for Lerner
0
211
Member Avatar for abu taher

I have 4 text box in a form. when I click a button another Form show with a MSflexgrid. when I click in a msflexgrid the data show a text box of another form. I write code: form1.Text1.Text = MSFlexGrid1.TextMatrix(MSFlexGrid1.RowSel, MSFlexGrid1.ColSel) But I when I click msflexgrid the same data …

Software Development visual-basic
Member Avatar for aktharshaik
0
1K
Member Avatar for koman

[code] //***************************************************************************** // CPSC1620 - Fall 2008 // // // Date: // Purpose: Program to perform array operations using functions //***************************************************************************** #include <iostream> using namespace std; //Prototype int readSeq(int []); int main() { return 0; } //***************************************************************************** //Function: readSeq //Assumption: Reads a sequence of integers //Action: Stores the sequence in …

Software Development c++
Member Avatar for freudian_slip
0
119
Member Avatar for ragaven

Hello friends............ How to check whether the given file path is valid or not in C,independent of OS......... Please reply immediately......... Thank you.........

Software Development c
Member Avatar for Ancient Dragon
0
343
Member Avatar for chetoos

i want to add a selection sort to this code by the id_number and i have the selection code but i cant implement it to my code [code]#include <iostream> #include <string> using namespace std; struct database { int id_number, age; float salary; string name; }; void input_data(struct database*data_ptr) { int …

Software Development c++
Member Avatar for ArkM
0
117
Member Avatar for slimjimmer

Hi. I'm new to C, so I have probably made an elementary mistake in my code. I am trying to make a program for finding roots of a quadratic equation, using if and else, but first I'm trying to get used to using the sscanf function which I have never …

Software Development c
Member Avatar for slimjimmer
0
435
Member Avatar for chengineer

hi,i started to learn java nearly 2 weeks ago so i dont know java clearly,i try to write a program about trainingzone. i must provide an interactive training zonecalculator that prompts a user for age. i write a program but it gives errors and i dont improve this,if anyone can …

Software Development java
Member Avatar for masijade
0
147
Member Avatar for at51178

Hi I am new to C++ programming and as my second personal project I am looking to create a program that will index my PDF,CHM,TXT,and WRD files located on my network drive at home. I would like to replicate window's search feature where you can search for a word or …

Software Development c++ pdf
Member Avatar for Freaky_Chris
0
69
Member Avatar for Th3_uN1Qu3

Hey again. I'm working on and off on my little tool that currently installs fonts, writes the registry, and will do various other things i'm gonna need. I'm currently trying to implement full error checking before i go on, and i'm pretty clueless on how to use return values. I …

Software Development c++
Member Avatar for Th3_uN1Qu3
0
96
Member Avatar for lllllIllIlllI

Hi guys, I was looking at some of the commercial IDE's today. Most notably being wingware's python IDE personal edition. I was wondering wether people thought wether the $30 you need to pay for it is worth it or is it not that great when it comes to it. Any …

Software Development ide python
Member Avatar for Stefano Mtangoo
0
62
Member Avatar for coolbuddy059

I'm writing a code for all the algorithm mention in cormen there are term DISK-READ and DISK-WRITE. Actually what the author want to say by using these terms.

Software Development algorithm c
Member Avatar for ArkM
0
143
Member Avatar for nuubee

Hi guys, Ok, so I'm a bit stuck. I'm creating a program that has 3 classes. An object of one of the classes needs to be made up from 2 objects from one of the other classes.. and I can't figure out how to do it. for example, if I …

Software Development c++
Member Avatar for Freaky_Chris
0
109
Member Avatar for Umair.P

Hi all, I am trying to write a software where I want to put some UI in the form that would indicate the loading process(progress bar, loading image etc). Please advice how to do it since when a form runs some code all the form gets static. Threading is also …

Software Development
Member Avatar for Jugortha
0
113
Member Avatar for santhanalakshmi

Hi, If Not IsNull(rs!permaddr1) Then mpaddr1 = Mid(rs!permaddr1, 1, 500) Else mpaddr1 = " " where permaddr1 is a field type of varchar(1500). Example permaddr1 = "No:11/19 , Anna Salai , Chennai-1"(from sql server retriving the values) This value is now is stored in mpaddr1. Now, My main problem is …

Software Development visual-basic
Member Avatar for sendoshin
0
168
Member Avatar for Dio1080

Ok, the code is almost done and I need help finishing up my delete function(between lines 51 to 71), I can't seem to figure out how to delete the 50 and the 20. Here is my code. BTW i'll list the output first. Thanks Sample output 10 20 30 50 …

Software Development java
Member Avatar for BestJewSinceJC
0
164
Member Avatar for ohnomis

Hi everyone, I have a question regarding reading commands from an array for a turtle graphics program. 5, x - Move forward x number of spaces (x being the next number in the array, ie. 5, 5) 4 - Turn right 9 - End commands (sentinel value) If you have …

Software Development c++
Member Avatar for vidit_X
0
152
Member Avatar for sharpst

I have got to create a simple calculator in a college level intro to c prog class, my calculator must be able to do division multiplication addition subtraction using whole numbers. Any ideas on what i should do? please help

Software Development c
Member Avatar for ajay.krish123
0
786
Member Avatar for jhuyenh

Hi, i'm very new here and very new to C. I'm trying to figure out how to encode and decode in my C class. i was given a two txt files to use. one is the decoding symbols and the other are the codes i need to decode. i started …

Software Development c
Member Avatar for ajay.krish123
0
430
Member Avatar for Yamachi

I'm currently writing a program in vb.net 2008, that is split into the main program and several DLLs (of which the user can select 1 to use). In the DLL, I have a function that reads data from a filestream into a structure, then returns the structure. While trying to …

Member Avatar for Yamachi
0
134
Member Avatar for Stefano Mtangoo

To Be honest this is matter of Choice and no one will be judged for his choice. I got stuck on best editor to use. I have long used Wing IDE 101 and My Favorite IDE with multi language is Netbeans which is coming with Nbpython. Big problem of IDE …

Software Development ide python ubuntu
Member Avatar for mathijs
0
240
Member Avatar for chetoos

I need help with this code to : a. Creating an array of employees b. Asking the user how many employees records does he want to enter. c. Modifying the input_data function to take the data of all employees and fill them in the array d. Modifying the output_data function …

Software Development c++
Member Avatar for Prabakar
0
239
Member Avatar for degamer106

Let me explain what I'm supposed to do first. My assignment is to take text from a dictionary entry and display it in my client area. This dictionary entry contains characters like \ " ' and text that's written in Greek. There is an image in the upper left hand …

Software Development
Member Avatar for LizR
0
115
Member Avatar for m_arian

Hi I'm new to coding. Can someone please help with a linked list problem. I'm getting numbers for output, I think they are addresses. The output I'm getting is: HEAD CODE -12086434400 1080131584 TAIL CODE The output I need is: HEAD CODE <rect x="0" y="0" width ="200" height="200" stroke-width="2" stroke="red" …

Software Development c++ linked-list xml
Member Avatar for Prabakar
0
112
Member Avatar for onlinesynch

There are many types of Data Synchronizations, you can Synchronize your data for PDA applications, or mobile applications, or you can convert your one type of Database into another types of Database format. Now days Mobile users also using Internet from Mobile Devices. Here we are talking about when you …

Software Development storage web-server xml
0
106
Member Avatar for tyserman5674

Hi All, I have 3 text boxes that have user input to preform calculations. What I would like to do is if the user inputs improper values to share the error code messages with out having to define the messages in each one of the text boxes using the same …

Software Development vb.net
Member Avatar for Teme64
0
314
Member Avatar for djhello

Write a program that implements an address book for your friends using linked lists. Each person has name, last name, and phone number. Data should be stored in ordered based on last name. The program should include the following menu: 1.Add a friend 2.Delete a friend 3.List all friends with …

Software Development c++ linked-list
Member Avatar for c++ prog
0
101
Member Avatar for q8_dreamy

Hiiiiiiiiii can any one help me plz :) i want to send date and another variables from form to another when click btn... how can i do it?????

Software Development vb.net
Member Avatar for himanshu.tomar
0
91
Member Avatar for haven_u

When i print data stored in a queue it also dequeue these data... can someone provide me hints on how to print data without dequeue...printing should only display data stored in that queue........

Software Development c++ queue
Member Avatar for Prabakar
0
93
Member Avatar for stealthdevil

Hi, I am using VB.Net 2005, VS 2005, and an Access Database. I have a datagridview on a form that gets populated from a table in the Access DB. What I'm needing to do is take the data from the DGV and put it into a table, "not the original …

Software Development vb.net
Member Avatar for himanshu.tomar
0
1K
Member Avatar for freelancelote

Hi, when I try to assign \0 using the expression: pPtr->myArray[127]="\0"; my compiler throws the following error: "invalid conversion from ‘const char*’ to ‘char’. Any idea on what's wrong? Any idea on how to solve the problem?

Software Development c++
Member Avatar for Ancient Dragon
0
109
Member Avatar for NOTSomebody

Hi, I am developing an application about tracing for preschoolers. Currently, I am developing a application and is using touch screen that does tracing. Currently, I am using mouseListener because if I am not wrong, touch screen basically equals mouse clicks. So now my application can does drawing. Next, I …

Software Development java
Member Avatar for NOTSomebody
0
136
Member Avatar for cheburaska

Hey, im writing a dictionary in Delphi, and i dont know how to solve 1 problem. How to make Delphi display an explanation for the selected word from the word list? :confused:

Software Development delphi pascal
Member Avatar for ooisootuck
0
195
Member Avatar for Jengrut

I create a form that can add,edit and delete particular into the listbox. The problem now is that i wan to save the particular on the listbox and wen i go in back i can load it back. i hope anyone out there can help me. This is the code: …

Software Development c#
Member Avatar for Jugortha
0
553
Member Avatar for cam875

If you have multiple If statements happening to check the logic on something is it better to just use all else if's to make your code execute faster? and I understand that people always say that it is better programming to keep your variables as far from being global as …

Software Development c++
Member Avatar for ddanbe
0
164
Member Avatar for DGeneral

Hello, I have been working on this code. What it does basically is read a text file, store the words in a binary search tree, prints out the words in alphabetical order along with line number where the word occur. [B]Example:[/B] Input: I need help with this code Output: code …

Software Development c++
Member Avatar for Ancient Dragon
0
183
Member Avatar for massivefermion

Well my question is obvious. I want to ask is it possible to write superscribe or subscribes in python ? thanks!

Software Development python
Member Avatar for massivefermion
0
155
Member Avatar for JustLearning

I need some help with this binary search tree. I am having a problem printing out the tree. I don't quite understand how to do it. I know that I need to use recursive call to traverse to the end of the tree but the way the header file is …

Software Development c++
Member Avatar for Sci@phy
0
180
Member Avatar for Trekker182

I have a project where pretty much all of the variables that I will be working with in spread though my base class and two inherited classes will be prompted for. Up until now, I just passed in the information through parameter constructors in the classes themselves from my application …

Software Development c++
Member Avatar for Trekker182
0
90
Member Avatar for bahr_alhalak

hi every one... i need some help from u.. i solved my assingment by my self an I need from u some help I will post my prgram and please check it if it need any edite or anything... This is the mainClass [CODE]import java.util.*; public class mainClass { public …

Software Development algorithm java user-interface
Member Avatar for dickersonka
0
115

The End.