132,726 Archived Topics
Remove Filter ![]() | |
Hey, I'm really stuck on a program I have to make for a class. We have to integrate f(x) = cos^2 (x). We are given a file with values of x and corresponding values of f(x). We have to use a while loop to do the following sum: sum to … Software Development c | |
I enter first time and works fine, but second time? Boom, it fails! What is wrong Best regards: [CODE=python] #Global values #key is ID/name and value is cost product = dict() identity = dict() #Function to check and add product and its ID def get_prod(): #anything can be a name … Software Development python | |
What is the syntax to display the contents of a simple text file to a listbox? Software Development vb.net | |
Im trying to count the frequency of words from a file and cant seem to get it to work. My frequency function recognizes the word is there but doesnt return a count for each word yet. The text file would just hold a bunch of random words...please help. [CODE]#include <string> … Software Development c++ | |
I have a general question. Is it possible to write a C++ program that can detect specific frequency tones, like 1 Mhz, 2Mhz 3Mhz etc... Until now I have written standard code in C++ both native and mangaged and can manage the most components etc.. so I have a very … Software Development c++ | |
[code] #include <string.h> class ITEM //here i get the error { private: int price; char name[ 21 ]; int efatr[ 4 ]; public: void setName( char* newname ); void setPrice( int newprice ); void setAtribut( int x, int ef ); ITEM() { name = "Player"; price = 0; } ~ITEM(); … Software Development c++ | |
Hi I'm trying to extract certain parts of each line of a text file. An example of the lines is as such: [text] [number] [text] [number] [text] [number] ...And so on. I would like the text and number from each line as a separate element in an array of strings. … Software Development vb.net | |
Hi, here is my problem: I'm writing a small program that needs to read a text file and write the words of this text as a list. I could only come up with the little piece of code I wrote below and it's not even working. I believe the problem … Software Development c++ | |
I'm new to c++ programming and use it to program a microcontroller. Since memory is limitted (only 12 kb), I'm looking for a way to reduce memory usage when using some large arrays with floats that are constants. Is it possible to somehow write these arrays to ROM without them … Software Development c++ | |
Hi I'm currently working on a project that involves a carwash simulation. At the moment I'm stuck on sending a car object from the car class I created to another program. I am using udp for the sending of data for this project. I've googled how to do this with … Software Development | |
Hi, In an assignment I'm supposed to introduce packet errors and bit erasures in the packets.packet errors I can do.Bit erasures mean we have no idea if its a 1 or a 0.how can I introduce something other than a 0 or a 1 in a bit? Software Development c++ | |
hi all, i am developing a desktop application which is interact with the server in every 1 min and server return a updated xml feed.when i login into my application it minimize into the system tray i want to show the updated feed in a notification message box that is … | |
1) How can I use fscanf to read only the first character of each word in a text file? 2) How can I use fscanf to read only alphabets in a text file? - I tried %[a-zA-Z], but that doesn't work for some reason. Software Development c | |
1) Could someone explain the difference between composite and inheritance class 2) Is there a composite class with inheritance? Software Development c++ | |
Hi, I'm studying operator overloading through [B]C++ the complete referece[/B] and I've got some questions. In the book, the author writes this: [code=C++] loc loc::operator++() { ++longitude; ++latitute; return *this; } [/code] This creates a new object and returns it. [B]1.[/B]Wouldn't it be more efficient to return a reference? [B]2.[/B]This … Software Development c++ | |
please help me by doing the following program. I want to feed 80 students name,gender and CGPA.and want to sort in two cases.case 1 sorting with respect to their name case 2 sorting with respect to their CGPA. I would stat it like this. ******************************* #include<iostream.h> void main() { char … Software Development c++ | |
What is wrong with my code? It repeats the "Enter the next row:" statement more than once for each time its executed. And the characters turn in to brackets. [code] /* * File: fill.cpp * ----------------- * This program gets the perimeter of a closed shape * as an input … Software Development c++ | |
hi, everyone, i am new to C++, i tried implementing a String. and i need your help, i want to know what to improve for this class regarding performance, or everything else you think i should pay more attention to when implementing such a class for general use(of course, i … Software Development c++ | |
Hi, the concept of the program is enter a piece of text from the keyboard and place that piece of text into a file [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> void main() { FILE *fp; char s[80]; fp=fopen("new.txt","w"); if(fp==NULL) { printf("unable to open file"); exit(1); } printf("enter new line of text:\n"); … Software Development c | |
Hello there, after days of researching I finally managed to finish my dragging and dropping of mail items in MS Outlook. But I have this annoying pop up thing in MS Outlook, a security pop up that grants you access from the range of 1-10mins so that I can drag … Software Development c# | |
I have no idea ho to write a program for this problem and i am new to C++ so I really needhelp!! Consider the following file called "raw_points.txt". The first line of this file contains a count of how many pairs of coordinates are specified in this file. The remaining … Software Development c++ open-source video | |
Trying to create a hash table class that is basically like a spell checker. The header file seems all good but the implementation i'm having issues with. Primarily the insert function keeps vomiting on me when i try to compile. Basically complaining about my iterators being wrong??? Anyways, here's my … Software Development c++ | |
This regular expresion is not good !!! --------------------- if ($line=/(.*)=(.*)(#+.*)/){ my ($val,$key,$comment)=($1,$2,$3); print "Match line : key($key)=val($val) c($comment) \n"; } --------------------- Example os inputs and the wanted output : a=b #c => key(a)=val(b) c(#c) a=b => key(a)=val(b) c() a="b#" => key(a)=val("b#") c() a="b#"#ff => key(a)=val("b#") c(#ff) a="b"#"#ff => key(a)=val("b") c(#"#ff) … Software Development perl | |
ok heres my code [CODE]import java.util.Scanner; class TestTelevisionV3 { public static void main(String [] args) { Television tv = new Television (4, 8, true); tv.printImage(); Scanner myInput = new Scanner(System.in); String Input1 = myInput.next(); String s1="P"; String s2="C"; String s3="V"; String s4="Q"; do { tv.printImage(); System.out.println(""); System.out.println("Press P to turn … Software Development java | |
Hi, I'm new here. I've got a problem with my project. I get the following link error in VS2008 [code]main.obj : error LNK2019: unresolved external symbol "public: __thiscall PSystemManager::PSystemManager(struct HWND__ *)" (??0PSystemManager@@QAE@PAUHWND__@@@Z) referenced in function "public: virtual bool __thiscall MyApp::OnInit(void)" (?OnInit@MyApp@@UAE_NXZ)[/code] main.cpp is for example this: [code] #include "./PSystemManager.h" bool … Software Development c++ | |
OK I have a function that calls an array of class types and I need to remove any duplicates from the array. That is what the function is for. So I created an operator overload for the '+' operator and made a 'Changebalence()' mutator that add two doubles for me … | |
import java.util.Scanner; class TestTelevisionV3 { public static void main(String [] args) { Television tv = new Television (4, 8, true); tv.printImage(); System.out.println(""); System.out.println("Press P to turn Power On or Off"); System.out.println("Press C to Change the Channel"); System.out.println("Press V to Change the Volume"); System.out.println("Press Q to quit"); System.out.println(""); Scanner myInput = … Software Development java | |
Yesterday, i was programming a program in Java when i came accross something i though was just amazing. I could read and write complete Obects with just one line of code! They would go to a file and when i loaded then they would be straight back, without me having … Software Development python | |
I'm trying to make a shuffler for a blackjack program it's supposed to give me back a random number from a deck of cards each time i call it. But it's also supposed to keep track of cards out of the deck.. I need to make it a function call, … Software Development c++ | |
how to register the dll and ocx using visual basic 6.0 in windows vista. Software Development visual-basic windows-vista | |
hi everyone.. i need to ask 2 questions.. first..is the below code done using recursion or not? second..how can i make the below code take input from a text file instead of generating random numbers and make the output go to a new text file? [code=cplusplus] #include <iostream> using std::cin; … Software Development c++ | |
HI I am getting this error Error 11 fatal error C1083: Cannot open include file: 'Test/Testnamespaces.h': No such file or directory I have included the following statement in the code using namespace Test; Can anyone please tell me the reason for this . Software Development c++ | |
I am trying to read in a simple xml file and display all the child elements all i get is the error [QUOTE]Traceback (most recent call last): File "/Users/adamplowman/Documents/Uni/project/python/test_xml.py", line 10, in <module> for element in tree: TypeError: iteration over non-sequence[/QUOTE] Here is the xml file [CODE]<root><child>One</child><child>Two</child></root>[/CODE] and this is … | |
[CODE]#include <iostream> #include <string> #include <vector> #include <fstream> #include <iomanip> using namespace std; void getData(ifstream& infile, vector<int>& itemID, vector<string>& itemName, vector<int>& pOrdered, vector<int>& pInStore, vector<int>& pSold, vector<double>& manufPrice, vector<double>& sellingPrice); void do_again(),usersChoice(char ans); void searchInventory(string searchInput); void printReport(); void printHeading(); void sellStock(string sellItem, int numSold); int showMenu(); int ans(); vector<int>itemID, … Software Development c++ | |
I have the variable Adam that contains some information. Later on i have some more information to add to the variable adam. How can this be done something like [CODE] adam = "john" adam = adam + "mike" [/CODE] Software Development python | |
Im using CodeGear Delphi 2009 Builder. I also installed C++ builder so i have all the .c .h includes. I downloaded the source of an application and without making any changes i tried to compile. I get many errors in most units: [IMG]http://img376.imageshack.us/img376/6752/26142144un0.jpg[/IMG] I've spent hours trying everything. Some of … | |
Hello, Hey guys, love the forums here, very nice. I am having a bit of coding problem with an assignment from college. (I read the announement no worries I am not looking for you to do it for me ^_^) Anyway, I have a form, which I am not done … Software Development | |
I didnt know i must post code here so sry everyone :). So my problem is next: I have two exes that need to excange data. I tried using standard ::CreateProcess() and ::GetProcAdress() functions but got errors. I presume thats becouse exes are in different processes. I cant use COM … Software Development c++ data-structure | |
Can someone suggest me a method to convert a floating point number into binary using assembly? for example 5.5 would be 000..101.1 but how would you go on about this in assembly? Software Development assembly | |
Hello All Greetings I want to use Lame enc windows DLL procedures. I'm not very dipped in DLL things but it is that I want to use it in my Encoder. Any way can I use it in python?? Also Any suggestion on CD ripping library and Vobis/Ogg/Flac/wma encoder library … Software Development python | |
Hi frnds.. Need help in writing a small script... I have the following text file... 1)PPI2MSNK I5 P50 2) PIAIS Major 3)PPI2MSNK I5 P51 4) PILOS Major 5)PPI2MSNK I5 P57 6) PIAIS Major 7)PPI2MSNK I7 P57 8) PIAIS Major I want the script to join the line 1-2 , 3-4 … Software Development shell-scripting | |
Hello there, I've installed VSTO to my pc and I'm trying to make an application using the MS Office in my VS (2008). I've already added the reference to Microsoft.Office.Tools but when I compile it, it gives me the error: [QUOTE] The type or namespace name 'AddIn' does not exist … Software Development assembly microsoft microsoft-office | |
anybody can help me to fix my counter. until now i'm still stack on this error. [U]counter[/U] For i = 1 To grd.Rows - 1 With INV If grd.TextMatrix(i, 0) = INV!ProdCode Then .Edit !Quantity = !Quantity + Val(grd.TextMatrix(i, 3)) .Update Else .AddNew !ProdCode = grd.TextMatrix(i, 0) !ProdName = grd.TextMatrix(i, … Software Development visual-basic | |
This is my first post, and I'm VERY new to C++, but I just finished my first class, and upon requesting the final, I was told to re-do one of my programs, because instead of computing the values, I just displayed them. (It never said I needed to.) Now that … Software Development c++ first-post | |
Hello, i have a simple question about pointers... The code that goes with the problem is: [code] int* getPtrToArray(int& m) { int anArray[5] = { 5, 4, 3, 2, 1 }; m = 5; return anArray; } int main() { int n; int* ptr = getPtrToArray(n); for (int i = … Software Development c++ | |
Hello again... So, I'm trying to read a file line-by-line and compare the first 5 characters of that line (that was read in) to another character string. If they don't match then it moves on to the next line of the file and tries to compare again. The problem I'm … Software Development c client-server | |
strunct num { int count; }; void main() { num n1; num *p; p=# scanf("%d", p->count); printf("%d", p->count); } when I attempting to do this one I got the error message like 0 Null pointer ..... Software Development c | |
Okay, so I've been working on a program that will allow the user to input what items they want into an array and make the output look like this: Item 1. Sword Item 2. Shield Item 3. Sword Item 4. Armor with some help, i was able to figute that … Software Development c++ | |
Hi all, i am new to this forum.can u please explain,how we can read data from pdf. |
The End.