132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for BLUEC0RE

My original plan was to pipe "ls -l", get the permission string that represented the file in question. Translate the string of 'r's 'w's 'x's '-'s into 0s and 1s then convert it from binary to octal. This seems really cumbersome and annoying and I gotta figure there is some …

Software Development c file-system
Member Avatar for BLUEC0RE
0
174
Member Avatar for jeffpro

Hey guys I'm trying to make a directdraw program to output certain statistics but it's not drawing fast enough. Does anyone know how to increase ddraw update speeds? Thanks in advance!

Software Development c++
Member Avatar for jeffpro
0
92
Member Avatar for CrumbledCookies

I don't fully understand what is wrong with my code, it will read the first lines of any text file but then overloads and keeps displaying "0.00" and then crashes the program. I'm trying to get it to read student's last names and read their GPA scores, and the sentinel …

Software Development c++
Member Avatar for CrumbledCookies
0
2K
Member Avatar for abk07

Hi! I’m trying to write a ‘C’ program to extract variable definitions and variable use in each line from a input ‘C’ program. That is, a variable is said to be defined when its value changes(including declarations) and it is said to be ‘used’ when it is referenced. I need …

Software Development c
Member Avatar for WaltP
0
212
Member Avatar for jalpesh_007

I have made floyd warshall algorithm. I need some help for finding shortest path from source to destination. We have to give source and destination. Eg. Program gives us output like source=A and destination=D then shortest path is A-B-D with distance 10. I also give the code for that in …

Software Development algorithm c file-system
Member Avatar for rubberman
0
371
Member Avatar for Climber Ty

Okay here's what I have so far... The error I receieve is below... The HCP Header File [CODE] #ifndef HEALTHCAREPROVIDER_H #define HEALTHCAREPROVIDER_H #include "stdafx.h" #include <string> #include <iostream> using namespace std; class HealthCareProvider { protected: string fullName; string profession; int yearsExperience; string companyType; string apptAvail; double bill; double fee; public: …

Software Development c c# c++ visual-studio
Member Avatar for Climber Ty
0
158
Member Avatar for msqueen082

Hi I could sure use some help. In a form of a push in the right direction. I am tryig to remove all multiple tcode (stock name) and add (if tcode is "B" add the shares and if tcode is "S" subtract the shares) them together in just one line …

Software Development vb.net
Member Avatar for hercx
0
128
Member Avatar for megaLU

Hello! I have written a nested for loop with an inner loop of 86400 iterations and the outer loop 365. It compiles and everything but only gives me 97 of the 365 results. This is the error message: [CODE]aqua(855) malloc: *** mmap(size=268435456) failed (error code=12) *** error: can't allocate region …

Software Development c++
Member Avatar for rubberman
0
187
Member Avatar for ChaseRLewis

I know printf prints to "stdout" how exactly can I change the pointer to a class of mine that i'd prefer to handle the output string? or is it better to just process using sprintf and manage the strings? Would there be any issues with the first method?

Software Development c++
Member Avatar for rubberman
0
89
Member Avatar for Freedom*

hello! well, i want to read 10 grades and put them at an array... i want the values to be >=0 and <=10 how can i do that? what changes i have to do at my method? [CODE] using System; class Student { blah blah public void SetGrades() { for …

Software Development
Member Avatar for Freedom*
0
132
Member Avatar for Robert955

Hi, I am making a 2D game with XNA 3.1 where I want to make my space ship move with the arrow keys. atm when I press left or right arrow the ship rotates around its own axis. but now I want to make it fly into the direction its …

Software Development
Member Avatar for Robert955
0
77
Member Avatar for eman 22

[CODE] int main(){ // I have an error in the next line read_file("F:/2nd year_2/Data structure 2/books/lecture-26.pdf"); return 0; } string read_file(char* address){ string line; ifstream myfile (address); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line << endl; } myfile.close(); } return NULL; }[/CODE] this program …

Software Development c++ data-structure pdf
Member Avatar for eman 22
0
139
Member Avatar for BigTito89

Hello, I'm creating a game editor and I'm at the current stage that I would like the ability to attach scripts to objects (by selecting the string of the method name to be called). That would be saved into the object's scripts to load / run array. That shouldn't be …

Software Development gaming
Member Avatar for Momerath
0
178
Member Avatar for shyla

i am trying to figure it out, and i cant get the income and the SSN to show [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Assignment5_Koch { class Rates { public readonly int incomeLimit; public readonly double lowTaxRate; public readonly double highTaxRate; public Rates() { incomeLimit = 30000; …

Software Development
Member Avatar for Momerath
0
236
Member Avatar for altXerror

i have part of a text based game that keeps track of the HP , DEF... and such. it needs to be able to replace the current value for the variables, in which case are: [CODE]long HP, def, sheild;[/CODE] for instance, you battle a monster and the attack does 75 …

Software Development c++
Member Avatar for daviddoria
0
89
Member Avatar for Ancient Dragon

I tried to write up a test program that uses std::copy and istream_iterator to copy one text file to another. But it doesn't work because the '\r' and '\n' in the file are lost. I've tried opening the input and output files in text mode and I've tried opening them …

Software Development c++ ios
Member Avatar for vijayan121
0
717
Member Avatar for brandonm

Hi all, I'm having an issue with updating an XML that already exists. I have no problem creating an XML but when it comes appending to the end an existing xml nothing happens. I dont get any error messages so I'm not sure what I'm missing, the first part where …

Software Development c c# c++ xml
Member Avatar for brandonm
0
159
Member Avatar for apanimesh061

[CODE] using system; public class Hello{ public static void main(){ console.WriteLine("Hello C# World :)"); } } [/CODE] This is code I just wrote and ran it as hello.cs ..... I got this error. [CODE] C:\learncs\csc/nologo/out:hello.exe hello.cs 'csc' is not recognized as an internal or external command, operable program or batch …

Software Development c#
Member Avatar for ddanbe
0
183
Member Avatar for caut_baia

Is this ok to do or have i forgot my manners?Thank you [code] struct A { virtual A* func()=0; }; template <typename T=int> struct B : public A { A* func () { return this; } }; typedef B<> B_int; typedef B<float> B_float; struct C : public B_int { A* …

Software Development c++
Member Avatar for caut_baia
0
134
Member Avatar for jmalbornoz

Hi, I have been programming in C for some time and now I am trying my hand at C++. As we all know, global variables are baaaaad... However, I am developing a collection of classes and I need them all to share a common variable (a time step) whose value …

Software Development c++
Member Avatar for jmalbornoz
0
3K
Member Avatar for apanimesh061

Most people at my college say that Java is easier than C#. Is it true ? On the internet mostly I see are Java apps. !!! Could anyone anyone tell me that what are the applications of C#, 'cause I am planning to a project on this language. Thanx

Software Development c# java
Member Avatar for ddanbe
0
92
Member Avatar for Daita

[CODE]#include<stdio.h> #include<conio.h> main() { typedef enum y; int c; y colour {RED,WHITE,BLUE,BLACK}; clrscr(); printf("The assigned value is %d\n",RED); printf("The assigned value is %d\n",BLUE); printf("The assigned value is %d\n",BLACK); c=RED+BLACK; printf("RED+BLACK IS %d",c); getch(); }[/CODE] What is wrong with this code please? 

Software Development c
Member Avatar for Daita
0
162
Member Avatar for mg120

I am trying to seperate JTextArea colums as you can see on the pic. How can i do that any idea ?

Software Development java
Member Avatar for mKorbel
0
73
Member Avatar for Falcon25

Hi i'm new to C# and programming in general. First of all this site has been very helpful and I was wondering if someone could explain what constructors are to me as simple as possible. I'm teaching myself at home and the book is either not very good or i'm …

Software Development
Member Avatar for Falcon25
0
80
Member Avatar for asrockw7

[CODE] void printTable(char (*tacToe)[3], int row, int col){ } void initTable(char (*tacToe)[3], int row, int col){ } int main(void){ char tacToe[3][3]; initTable(tacToe, 3, 3); printTable(tacToe, 3, 3); } [/CODE] here is my question. what is the difference between *ary[] and (*ary)[]? when i did the program initially like so: [CODE] …

Software Development c
Member Avatar for asrockw7
0
260
Member Avatar for urataru17

Good day, First of all, is it possible to have a single report from two different tables? Because I have been reading articles that are saying that it is not possible and a subreport should be implemented? Can anyone clarify this for me? I've been retrieving the fields that I …

Software Development vb.net
Member Avatar for vanzhyme
0
448
Member Avatar for zaneulhaq

Hey guys i'll show the code first then explain my problem: [code=c] Class A { /*Variables required by A, B, C and D */ /*functions required by B and C*/ }; Class B { /*some of it's own functions and variables*/ }; Class C { /*some of it's own functions …

Software Development c++ oop
Member Avatar for Stefano Mtangoo
0
410
Member Avatar for Khoanyneosr

[CODE]// Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <vector> #include <algorithm> using namespace std; //Functions void instructions(); void game(); // Types and Arrays string choice; string inst; const int MAX_WRONG = 8; vector<string> words; const string THE_WORD = words[0]; string soFar (THE_WORD.size(), '-'); …

Software Development algorithm c++
Member Avatar for jonsca
0
167
Member Avatar for sharmadha

When can i get the recordcount is -1? how to solve it? the table is fresh

Software Development visual-basic
Member Avatar for samsylvestertty
0
105
Member Avatar for jamshed ahmed

in below code there is syntax error in from Clause but i think every thing looks fine iam using access database thx and relation is fine between thes two table [CODE] Public Function GetGridData() As DataTable Dim dt As New DataTable Try Dim con As New Connection() Dim cmd As …

Software Development vb.net
Member Avatar for jamshed ahmed
0
98
Member Avatar for saddas

hello i have a form and a database linked by SQL. i have checkboxes in the access database that are ticked when a product is sold is there a way to make a checkbox in access tick once the product has been selected in the form? thanks, help would be …

Software Development visual-basic
Member Avatar for reygcalantaol
0
107
Member Avatar for Jessurider

can anyone tell me the error in the below attached code.......... actually when 1 press Numpad1 a message telling NumPad1 is pressed, similarly when i press Numpad3 another message telling that NMumpad3 is pressed.......and also when i press both keys ie. Numpad1 & Numpad3 another message telling that "press any …

Software Development
Member Avatar for Jessurider
0
100
Member Avatar for fadi_1234

can anyone explain why the output of this code is 110 ? [CODE]// Assignment 1-Body Mass Index Calculator #include <iostream> //allows program to output data to the screen using namespace std; //function main begins program execution int main() { int total=0; for (int number =2;number<=20;number+=2) total +=number; cout<<"Sum Is"<<total<<endl; return …

Software Development c++
Member Avatar for veda&&
0
92
Member Avatar for bia

I m new to C#.Can anyone tell me the syntax of strin in C#? thanx in advance

Software Development
Member Avatar for ddanbe
0
54
Member Avatar for jmcginny5

So I have the program written, but for some reason, when I go to compile it, the display box pops up and then disappears right away. Can you please help me to figure out what I did wrong? [CODE] #include <iostream> #include <iomanip> #include <cmath> #include <string> #include <fstream> using …

Software Development algorithm c++
Member Avatar for zaneulhaq
0
100
Member Avatar for c++prog

write a program to print how many times each word appear in the file.

Software Development c++
Member Avatar for zaneulhaq
0
72
Member Avatar for Bladtman242

[B]TL;DR:[/B] I am asking for help considering the structure on the following code, and advice on code structure in general. The problem in this case is the try blocks, which are messing up the scopes and complicating error handling. I will elaborate a little for the more patient readers below …

Software Development file-stream file-system java
Member Avatar for Bladtman242
0
228
Member Avatar for Limiter

A very small problem I am having. Here is an example: A class representing a book [CODE] public class Book { private String title, author; //Constructor for book public Book (String name, String writer) { title = name; author = writer; } [/CODE] Another class called Bookshelf representing a collection …

Software Development java
Member Avatar for Limiter
0
2K
Member Avatar for ekin5683

[CODE]mport java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.*; import java.awt.*; import javax.swing.ImageIcon; import javax.swing.JApplet; import javax.swing.JButton; public class Main extends JApplet implements ActionListener,ItemListener { //private Image im; // image handler //private static final String IMAGE = "enviro2.jpg"; //starFish tapakSulaiman = new starFish(this); public void init() { …

Software Development image java java-swing
Member Avatar for mKorbel
0
437
Member Avatar for stereomatching

[code] std::tr1::array<double, 10> alpha; std::iota(alpha.begin(), alpha.end(), 0); using namespace boost::accumulators; size_t const SIZE = 1000000; accumulator_set<double, stats<tag::mean, tag::lazy_variance > > acc; std::for_each(alpha.begin(), alpha.end(), [&](double const VALUE){ acc(VALUE);}); [/code] How could I clear the contents of the acc if I want to evaluate a new mean and variance? Thank you very …

Software Development c++
Member Avatar for vijayan121
0
879
Member Avatar for rssk

Hi all... I am trying to upload 4 files on a local disk, onto a remote ftp server. All of them are in the same folder(in local machine). I am using the storbinary function of ftplib. Following are the file sizes: 1-- 70 KB 2-- 60 KB 3-- 73 KB …

Software Development file-system python
Member Avatar for rssk
0
887
Member Avatar for Voidz

Hi DW(DaniWeb) - I hope that's the correct term, since I'm a total Python/DaniWeb noob. I [B]think[/B] Python doesn't have a RE(Runtime Environment), but Python has the option for one. [URL="http://www.python.org/download/"]http://www.python.org/download/[/URL]. So, basically what I want to know is, do you [B]have[/B] to have a RE(Runtime Environment) or anything like …

Software Development python
Member Avatar for TrustyTony
0
1K
Member Avatar for tim.newport

Ok So I am trying to save text from a textbox to a rtf file. The Saves Text would come from the active mdi Child. However I can not figure out how to Save using active child just calling the actual form name. Below is my code so far. [CODE]Private …

Software Development vb.net
Member Avatar for tim.newport
0
768
Member Avatar for Kath_Fish

Hi...now i doing split. i got face some problems. Let say, I got store my data in string type 1 2 1 2 3 1 2 3 4 now i want it to split line by line.But after i split them, i got the result is like this 1 2 …

Software Development
Member Avatar for abelLazm
0
82
Member Avatar for Crapz

We have no idea how to start our project regarding Minimum Spanning Tree (Kruskal) we have to implement it on java, i would like to ask what are the useful functions for MST under jgrapht or jgraph? thank you.

Software Development java
Member Avatar for Crapz
0
89
Member Avatar for maybnxtseasn

i am injecting a dll into oneo my process's and i want it to read the bytes of the file and write those specified bytes to a file on hard disk. The problem is my .dll compiles, but when the .dll isi njected, it never creates the file and writes …

Software Development c++
Member Avatar for Ancient Dragon
0
97
Member Avatar for wildplace

i have a header file defined as : [CODE] template <typename NodeElement> class Node{ //public members public: something here..... private: }; template <typename ListElement> class List{ public: something.... Node *nodePtr; //problem here }; [/CODE] [CODE] list.h:38: error: ISO C++ forbids declaration of ‘Node’ with no type list.h:38: error: expected ‘;’ …

Software Development c++
Member Avatar for wildplace
0
111
Member Avatar for thisischris

Say I have something like this [CODE] #include <iostream> #define ICOL 32 using namespace std; int main(int argc, char *argv[]) { ... [/CODE] Is there a way that I can change the value of that global variable within main? Simply saying ICOL = 300; does not work...

Software Development c++
Member Avatar for mike_2000_17
0
177
Member Avatar for rookanga

Database edit then save problem Im trying to make a database and for the most part it works. The form1 has add new button (which goes into my form2 window that adds all of the information there, then I hit save, when I exit it and comes back to the …

Software Development vb.net
Member Avatar for rookanga
0
611
Member Avatar for t_man700

Hey guys, I have a really quick and hopefully easy question for you all. I'm trying to read in and store some floating point numbers from a file into an array. The lines look like: [B]boom.txt:[/B] [CODE] v 0.000034 0.44556 0.34444 v 4.000 1.0 1.0 v 4.00056 1.2003030 4.000 [/CODE] …

Software Development c opengl
Member Avatar for t_man700
0
141

The End.