43,549 Solved Topics
Remove Filter ![]() | |
How do I read a file thats in a folder, but is in the same folder as the exe.? And how do I do this no matter what folder the root folder is placed in? Software Development c++ | |
Running 64-bit Fedora 8 on HP laptop with AMD Turion 64bit/dual core, developing in Eclipse, compiling with g++. The [icode]clock();[/icode] function always returns 0. Any ideas why this is so? I have had no problems using the rest of the [icode]ctime[/icode] library. [code=cpp] #include <ctime> using std::clock; #include <iostream> using … Software Development c++ | |
Hi, I have a problem creating one part of the program, Lets say we have a line (from data file): 333 hou 23se 444 bi 4g and the program should change to : house big deleting first number if there is one ,and changing word parts to numbers, and deleting … | |
I have a problem geeks!!! In following program..... [code=c] #include<stdio.h> #include<conio.h> void main() { float f=0.7; clrscr(); if(f<0.7) printf("C+"); else printf("C++"); getch(); } [/code] in the above program when I give the value of f=0.7 and in if statement also I put the same value 0.7 then the output of … Software Development c++ | |
I was wondering how i could set up a random number loop, but have it stop looping when it hits 1 or any other number i assign. i use dev C++ compiler [code] //Damage Roller #include <iostream> #include <cstdlib> #include <ctime> #include <conio.h> using namespace std; int main() { srand(time(0)); … Software Development c++ | |
![]() | Hi. So, my assignment is to convert an infix expression into a postfix one, and then evaluate it. I already completed the infix to postfix part. I have a small problem evaluating the postfix expression though. The expression deals with booleans, and allows the ! operator. I'm not sure how … Software Development c++ |
Basicaly I'm trying to do this [code=C] int create_student(student_data *student){ printf("Nome do aluno:\n"); fgets(student->name,name_limit,stdin); //wtf? printf("Número do aluno\n"); fgets(student->number,name_limit,stdin); printf("Aqui devia estar um nome %s",student->name); return 1; } [/code] Where student is a custom struct, student->name is char array. For some reason it seems to skip the fgets. Replacing with … Software Development c | |
Hey, I'm trying to get my program to run correctly. I can get the black screen to come up after compiling, but it does not say "Press any key to continue...". I'm reading from input file and want to see results in an output file. My ultimate goal is to … Software Development c++ | |
I've tried searching the web and cant find anything to help me. I'm trying to create a 2D java maze application and have come up with the code below. It generates the maze and GUI no problem, and I've worked the code out to create a xPosition and a yPosition … Software Development gui java java-swing | |
hello, i'm a newbie programmer (and to python, double trouble :) and running into issues reading and writing files. i'm successfully running the code below to manipulate and remove the first few lines of a text file. The text file (file1.txt) is approx. 329kb but when i run the code … Software Development file-system python | |
Hi, I wrote a program to input an INFIX convert it to POSTFIX and then evaluate it. But the function 'evaluarRPN' used for evaluate POSTFIX some time work and some time not, depend of the input. For example: (8*9-8/5+6)*(5-9) = -305, but the program display -308 (8+9) = 17, display … Software Development c++ | |
I need help with manipulating my computers clock through a c++ program and i have no idea on how to make the program. Does anyone have any idea on how to do this? | |
I'm a Comp Sci I student in college, and I have an assignment to make a quick sort that can sort vectors up to size 32000 with no problem. So, my program has been having a lot of trouble with big numbers, and every once in a while, I get … Software Development c++ | |
Hey, Yet again i was just mucking around on DEV-C++ and made this code.. [code=c++]#include <conio.h> #include <iostream> using namespace std; unsigned long Double(unsigned long doubleMe) { return (2 * doubleMe); } int main() { unsigned long numberToDouble; unsigned long doubledNumber; cout << "Enter a number you would like to … Software Development c++ | |
How does one declare a string as a data member in a class? I tried it this way, but my compiler says that's not it [code] class cdrom { public: cdrom(); void loadinfo(); float returncost(); void displayinfo(); void changedata (); private: float cost; string name; string cdtype; }; [/code] Software Development c++ | |
I am writing a doubly linked list, but i am having problems inserting. Here is my code for the node, and main. The issue is in the main when i call insert, it gives me null. How can i get the node to point to head, and tail(insert it). Help … Software Development java linked-list | |
Hello all, I have an assignment to create a base class for a vector. Now after reading through the instructions I am still unclear the instructions. I am NOT asking for you to do my homework! I just need some clarification. PLEASE DO NOT POST ANY CODE! Here is a … Software Development c++ | |
I have written the following code that I will post below. Each time I try to compile it I receive the following error. [CODE]1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall OrderSet::OrderSet(void)" (??0OrderSet@@QAE@XZ) 1>C:\Users\Bill\Desktop\School1\c++\c++ spring cs2\program2\Debug\program2.exe : fatal error LNK1120: 1 unresolved externals[/CODE] Note I am using Visual Studios … Software Development c++ | |
I am working on my senior project and I am using C#.net and Microsoft Access to create a program that lets the user store information into a database. I have many tables but the primary table that mostly everything connects to is the customers table. Well I know how to … Software Development c# microsoft microsoft-access | |
I need to know how to create a triangle, and how to fill it with color. I am new to programming and would appreciate the help. I am not running the applet in a web browser, just executing it. Thanks. Software Development java web-browser | |
Hey, Was bored so *TRIED* to make this simple countdown program but i'm just not sure what to put in the for loop? [CODE=C++]#include <iostream> #include <windows.h> using namespace std; int main() { int countDown; cout << "Enter a number to count down from : "; cin >> countDown; for(int … Software Development c++ | |
I am currently attempting to program my first game in C++ using Microsoft Visual Studios Express 2005. After doing some research, I found that it is missing several packages including the one that I need (windows.h). That's free software for ya. Anyways, I was having trouble finding a way to … Software Development c++ | |
Hey, I was using some code to write int's defined by user to a file but found when you use [CODE=C++]myfile.open ("lover_names.txt"); myfile << firstLover << " " << secondLover << " " << lovePercent << "%\n\n"; myfile.close();[/CODE] It replaces the other text in the text file, the answer will … Software Development c++ | |
Hi all, I think I might try my hand at creating a text based adventure game in java. No I don't need cutting edge graphics, or state of the art fatalities etc what I am looking for is a solid, story driven adventure/RPG game. I would appreciate some advice on … Software Development database-design java | |
Its an assignment I have to submit, we have to make a maze using stack and input text file but I admit that i'm tottaly lost in this, something wrong with my code (or really alot of mistakes) please help! #include <iostream> #include <fstream> using namespace std; struct node { … Software Development c++ | |
Does anyone know if rs-232 c++ code written with the windows.h library is easily changed to support rs-485 and rs-422 or if its not similar at all? Thanks. Software Development c++ | |
I can't figure out why this won't exit when quit is entered. [ICODE] import java.io.*; import java.util.*; public class Trial { static final String ADD_COMMAND = "add"; static final String REMOVE_COMMAND = "remove"; static final String QUIT_COMMAND = "quit"; static final String PRINT_COMMAND = "print"; // Create a single shared … Software Development java | |
Hi all I am brand new to python so if anyone could help that would be great. The trouble I have is that I am trying to call two other programs from within a parent program, and pass arguements to these children programs. Here is my code so far, but … Software Development python | |
I don't know where to put quit.png. This result in errors. Is it put on SPE folder or somewhere in python? or Just in same directory as saved file? I appreciate your help! Steve Code import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,size=(700,600)) toolbar=self.CreateToolBar() toolbar.AddLabelTool(wx.ID_EXIT,'',wx.Bitmap('..\icons\quit.png')) app=wx.App() MyFrame(None, -1, 'Simple Toolbar') app.MainLoop() Software Development python | |
Okay I'm gonna be honest with you... I have no idea what I'm doing... no not even a little. I'm in an online C++ class that I'm only taking because it was the last required course for me to graduate this semester... This is the last assignment due and I … Software Development c++ | |
Hi , I am new to c++. I am reading "C++ How to Program" .In one example author divided the program into 3 files. The first one is Gradebook.h which contains prototypes. second Gradebook.cpp which contains actual implementations of member functions of Gradebook.h. last file is fig03-14.cpp which contains objects … Software Development c++ | |
Hi guys, I'm working on this problem I've been struggling with for a while now. I'm still confused about parameters and I'm getting all these error messages, saying that a lot of my variables are undefined. I'm sorry, I know this probably looks like a mess right now, but if … | |
How do you add to a variable that is inside a foreach loop? Everything I try hasnt worked. Software Development perl | |
Hello, I have this very simple batch file that contains one command: xsltproc -o output.html stylesheet.xsl input.xml When I double-click the batch file, everything works fine. However, the batch file doesn't work when I execute it from my vb.net application: [code=vb.net] Dim p As New System.Diagnostics.Process p.StartInfo.FileName = "[I]path[/I]\go.bat" p.Start() … Software Development file-system vb.net xml | |
I am currently using Kubuntu 8.04. Although I do not know any bash, I altered the bash shell (via internet guides) to append history instead of truncating the history file. After editing the shell, the default way to clear the history only clears the interactive history and not the actual … | |
I have been given some C code to compile which is several years old and need to compile it to see exactly what the program does. I know visual basic to an amount but i haven't touched C before. Anyway, how do i go about compiling the C code when … Software Development c visual-basic | |
Hello, guys! I have to generate 10 different numbers. What I do is to store the generated numbers in array. Before that I check the array for duplicates. It compiles, but I get some duplicates. Thanks in advance for any help.[CODE=Pascal]program rand; {$APPTYPE CONSOLE} uses SysUtils; var j, i, a, … Software Development pascal | |
I am using vb.net 2003 and sql server 2000 as backend. I would like to do searching that will receive several input from user (input from textbox,combobox and radio button) that will retrieve data from sql server and display the output in textboxes and picture box. I can do the … Software Development display user-interface vb.net | |
Hi again, Can anybody tell me how to make use of the checkbox in the Listview control. I would like to make use of the checkbox box in order to indicate a finished task. This would require relating the tickbox to a value in a database. I have no problem … Software Development listview visual-basic | |
i need to display the contents of a database(table) MS access db, on to the screen. how do i got abt it??? the data keeps changing dynamically...the program should be able to refresh it self | |
Hello I have little problem with a code. I want to send information about a size on a file and uses “size_t filesize”. I will send this information thru a network called ”controller area Network” and uses the code stat = canWrite(hnd, 1234, size, 8, canMSG_EXT); in order to do … Software Development c | |
This is what I need > 1) I also need to use a for loop to prompt user to input two intergers: firstNumber and secondNumber (firstNumber must be less then secondNumber) > 2) Outputs all odd numbers between firstNumber and secondNumber > 3) output the sum of all even numbers … Software Development c++ | |
Hi I'm new to programing. My tearcher gave me a ster program where there are 4 right triangles, that triangles 2-4 are just reflections/rotations of the first one - all being right triangles of size 10 on the perpendicular sides * ** *** **** ***** ****** ******* ******** ********* ********** … Software Development c++ | |
following masijade advice i tried busting my head abit. i have written the following code import java.awt.event.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*; public class Game extends JApplet implements ActionListener { //Creating a new JPanel called panel1 JPanel panel1 = new JPanel(); //Creating a JLabel for panel1 JLabel header = … Software Development java java-swing | |
hi, this code compiled using visual studio. Have changed the line const size_t i= __gnu_cxx::hash(x); from const size_t i=stdext::hash_value(x); so that it would compile using gcc. However I am getting an error message as shown below. Any suggestions appreciated. Thx [code=cplusplus] template<class X, class Pred= less<X> > class Hash{ private: … Software Development c++ visual-studio | |
this is the output on server init: deps-jar: compile-single: run-single: checking the client of ip 169.254.86.65 checking the client at port 59000 checking the client at hostname RAF System with169.254.86.65is online probing the client of ip 169.254.86.65 creating the client of ip 169.254.86.65 whose hostname is RAF at port 59000 … Software Development client-server java peer-to-peer | |
Hi.. I'm want to read each record (in 1 line) using fread(), the problem is the record length is arbitrary.. e.g. 1 "Joshua" "Rosenthal" "34 Mellili Ln" "Earlwood" 1 "000113133121" 0.000 2 "Martin" "Serrong" "45 Rosenthal Ccl" "Doveton" 1 "000113133121" 0.000 3 "Jacob" "Leramonth" "59 Dalion Pl" "Belmont" 1 "000113133121" … Software Development c | |
I'm new to creating python extension modules with distutils. I'm trying to create a module that uses the fmodEx audio library on OS X, and I'm running into some trouble. The needed library file is called fmodexlib.dylib. My setup.py looks like this: [CODE] from distutils.core import setup, Extension setup(name='test', version='1.0', … |
The End.