43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for TasostGreat

i've got this code it compiles but it when I try to run it it says segmenatation fault [CODE]/* #include <stdio.h> #include <iostream> using namespace std; int rite(); int a,b; char g,f; int main () { size_t count; FILE * pFile; pFile = fopen ("in.h","r"); count = fscanf (pFile, "%d%d",&a,&b); …

Software Development c++
Member Avatar for TasostGreat
0
140
Member Avatar for agfras

I want it to skip any lines read that throw an exception so I store the lines with errors in an ArrayList. But when it goes through when it gets an error, it will not skip the line and give same error and keep repeating. [code=java]/** * */ /** * …

Software Development java
Member Avatar for agfras
0
81
Member Avatar for mtucker6784

Hi! First, I want to say that this is not any type of school assignment. I'm in the IT field and looking to work on learning C++. I've been following the book from: [url]http://msdn.microsoft.com/en-us/beginner/cc305129.aspx[/url] and I'm now trying things on my own. The program which the code below compiles will …

Software Development c++
Member Avatar for Rashakil Fol
0
138
Member Avatar for mmxbass

Attempting to scroll a simple background using pygame. This is proving to be near-impossible. It seems that once a surface is blitted anywhere, it WILL NOT blit into a new location. My two problem functions: [CODE] def loadMap(self): vid = _video._Video() self._bg = self._map.get_background().get_pyImage() self._fg = self._map.get_foreground().get_pyImage() vid.paint(self._bg,0,0) vid.paint(self._fg,0,0) def …

Software Development os-x python
Member Avatar for mmxbass
0
112
Member Avatar for serkan sendur

i wonder if i create an object from a class using new operator, and if i dont delete that object when i am finished using it, does it still remain in the memory after the program reaches the and of the main function? Thanks

Software Development c++
Member Avatar for Free_Classified
0
470
Member Avatar for death_oclock

Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; …

Software Development c file-system
Member Avatar for Aia
0
135
Member Avatar for tondeuse34

Hey guys, [CODE]import sgmllib class MyParser(sgmllib.SGMLParser): def parse(self, s): "Parse the given string 's'." self.feed(s) self.close() def __init__(self, verbose=0): sgmllib.SGMLParser.__init__(self, verbose) self.hyperlinks = [] def start_a(self, attributes): for name, value in attributes: if name == "href": self.hyperlinks.append(value) self.newhyperlinks.append(name) def get_hyperlinks(self): return self.hyperlinks import urllib, sgmllib f = urllib.urlopen("http://www.python.org") s = …

Software Development python
Member Avatar for scru
0
153
Member Avatar for Ghostenshell

Can someone explain how to add a file to a dictionary. The file is simple. Maybe a word or a number on each line. Here is the code I have. Didn't know if i should use this post or the List and Dictionaries post so kind of posted twice... sorry …

Software Development python
Member Avatar for woooee
0
169
Member Avatar for deerslayer

I have written and application to search through a text file and find the following data and pull out the 5th varible and place in a text box. P_SPEED 0 10 1100 0 .01 23 0 The next issue I am having to input, into a text box, a integer …

Software Development vb.net
Member Avatar for NightCrawler03X
0
326
Member Avatar for Passiongamer25

I need help with my program. The program reads water temperatures and when they were recorded from an input file called " biodata2.txt." Then the output is displayed in a file called "results.txt" So the input file looks like this: 2 // number of readings taken 200707211245 // date recorded …

Software Development c++
Member Avatar for Passiongamer25
0
94
Member Avatar for mjavier2k

Hi All, I have a question regarding on how to manage a child form with a datagrid inherited from a parent form. In most cases, changing the control modifier from private to protected will make the control editable in the child form, but with a datagrid, these seems not to …

Software Development
Member Avatar for Ramy Mahrous
0
124
Member Avatar for naomiauk

Hi members... I have made a simple chat bot in Visual Studio with C#.. Its very basic and basically talks to you, saying a few lines.. I need help urgently sexing this chat bot up, making it say more stuff, etc,... I'm wondering if anyone out their can help me …

Software Development c# visual-basic visual-studio
Member Avatar for cookpau01
0
274
Member Avatar for serkan sendur

if the object is created on the stack, the destructor is called automatically when the object is out of its scope. if the object is created on the heap using new operator, the destructor is fired explicity by using delete keyword. i created an example to demonstrate both cases: [CODE]#include …

Software Development c++
0
46
Member Avatar for Logi.

Hi there, I am trying to write a queue ADT using a linked list in C and have hit a snag initialising my queue... [code=c]typedef struct qNode{ int element; struct qNode *next; } qNode; typedef struct Queue{ struct qNode *front; int len; } Queue; Queue create_queue() { Queue q = …

Software Development c linked-list queue
Member Avatar for Logi.
0
186
Member Avatar for omrsafetyo

I am trying to keep formatting between cell references. For instance, I have a date in once cell (J9) and would like to add this date to a text field so e.g.: ="This will take effect on " & J9 & "." However, when I do this, I end up …

Software Development visual-basic
Member Avatar for omrsafetyo
0
149
Member Avatar for |\|asrin

Please somebody help me! I`m a beginner and want to learn web designing. I want to khow taht is there any diffrences between Java & JavaScript if yes which one of them is better for me I have learned just C programming language.

Software Development java javascript
Member Avatar for |\|asrin
0
156
Member Avatar for omrsafetyo

Unfortunately, I don't think this question is solved with a simple vlookup, or etc. I have a spreadsheet that has several tables of data with the following format on one sheet: gxxxx gxxxx gxxxx zzzzz gxxxx gxxxx gxxxx zzzzz The "g"s above would indicate an item for lookup. The "z"s …

Software Development visual-basic
Member Avatar for omrsafetyo
0
165
Member Avatar for serkan sendur

when i run my application i got "Memory fault(coredump)" run-time error, what might be the possible cause for this? Thanks

Software Development c++
Member Avatar for serkan sendur
0
104
Member Avatar for wotthe2000

Hi I'm getting the error TypeError: argument of type 'int' is not iterable when i run my program and don't know where I'm going wrong. My code is: [ICODE] class loan: global loanlist loanlist = [] def loanbook(self, name, ISBN, author, title): self.name = name self.ISBN = ISBN self.author = …

Software Development python
Member Avatar for Ene Uran
0
4K
Member Avatar for adam291086

I am trying to set a cookie but when i check my browser cookies nothing is set. What am doing wrong [CODE] #!/usr/bin/python # e begoli, python connector for mysql # import MySQL module import MySQLdb import cgi import Cookie import time cookie = Cookie.SimpleCookie() cookie["ID"] = "" print "Content-type: …

Software Development python
Member Avatar for adam291086
0
221
Member Avatar for clutchkiller

Im not sure if this is how the process would work, but if i am to say create a header file named myheader and in that header wrote [code=c++] #define functionName { code... } [/code] and then wrote a .cpp file and in the source code I would #include <myheader> …

Software Development c++
Member Avatar for Rashakil Fol
0
162
Member Avatar for gamerprog

I'm programming this RPG, and I can't get past the first battle. I can't figure out how to get the computer to break the loop when then enemy's health (enhp) is less than 1. I tried using an if statement, but then it didn't loop at all. Could you guys …

Software Development c++
Member Avatar for Murtan
0
2K
Member Avatar for Teethous

Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. …

Software Development c++
Member Avatar for Teethous
0
346
Member Avatar for oblivion4

Hi, I'm working on learning OpenGL using Visual Studio 2005 and I ran into these errors: [code]1>circle.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) 1>circle.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "long __stdcall WndProc(struct HWND__ …

Software Development c++ opengl visual-studio
Member Avatar for oblivion4
0
160
Member Avatar for SoulMazer

Hello, if you have seen any of my other posts you will know I am working on a script to make a "vocabulary test". I currently having it functioning nearly perfectly, except I get an error if I enter the wrong word. Code: [code=python]def vocabtest(): for r in words.values(): count …

Software Development python
Member Avatar for SoulMazer
0
102
Member Avatar for clutchkiller

I have declared kbSize as an integer earlier in my code as a global variable, so there's no confusion from replies with it being local, and have a formula that process's its value, but for some reason when my program hits this if statement, it always calls timeStamp(); even when …

Software Development c++
Member Avatar for clutchkiller
0
71
Member Avatar for RayvenHawk

I'm working on an assignment that I need to move a sphere around the screen with the keyboard arrows. I got the movements working and all that. But I'm drawing a blank on an "if" statement to prevent the image from going off the screen when the edges are reached. …

Software Development c++ image
Member Avatar for RayvenHawk
0
108
Member Avatar for andyv

Hi all. I am trying figure out why the compiler is giving me this error message: error LNK2001: unresolved external symbol "double __cdecl calcWindChill(double,double)" (?calcWindChill@@YANNN@Z) HomeWork3.obj I've declared, defined , and called the calcWindChill() function. I've obtained the values needed to feed into the function. They're not getting put into …

Software Development c++ ios
Member Avatar for Ancient Dragon
0
217
Member Avatar for r0ssar00

I'm currently developing a program to scrape my university's online timetable system and then convert the resulting data to iCalendar data. It's a learning exercise for me(I'm teaching myself C++) and there's a few things that still get me. I've been using XCode as my IDE for a while and …

Software Development apple c++ ide
Member Avatar for r0ssar00
0
142
Member Avatar for MrVile

I'm getting a compile error with this bit: [code]int valid(const char str[]){ int i, total = 0, multiplier = 10; for(i=0; i < 11; i++){ str[i] * multiplier += total; //this line is an invalid lvalue multiplier--; } if(total % 11 != 0) return 0; else return 1; [/code] I …

Software Development c++
Member Avatar for MrVile
0
268
Member Avatar for neoseeker191

I have an assignment for class and I am having a bit of trouble. I need to do a few things to improve the efficiency of this program. The first thing I am having trouble with is that we are supposed to modify the shuffle function to loop row by …

Software Development c++
Member Avatar for neoseeker191
0
1K
Member Avatar for vartikachandra

how do i read character by character from a text file?I need to check for "\n" and split the file on it. for eg: I am a girl.I livein acd. My name is sdljnl. usoihuid. So finally i want to delete the 1st msg(line) from thefile so that the file …

Software Development java
Member Avatar for vartikachandra
0
93
Member Avatar for clutchkiller

is there a way to contain the text in a normal format when writing out to a text file? By this i mean, if i have cout output a million a's, instead of one long line if u open and view the txt file, it is many rows. Thanks

Software Development c++ file-system
Member Avatar for clutchkiller
0
108
Member Avatar for Liszt

I have made a Form application that contains of 2 Forms. In these 2 Forms I have added controls and a lot of code behind. How will I "Close the code" to this project so no one can open it and see all my code that I have done. I …

Software Development c++
Member Avatar for Liszt
0
86
Member Avatar for wotthe2000

Hi I have certain number of books which each have an author, title and ISBN number. How is the best way I can store this so that when I want a list of the books I will be able to list the books with the title, author and ISBN number? …

Software Development python
Member Avatar for Ghostenshell
0
153
Member Avatar for mahdiahmadirad

Hi Dears! I am a Beginner, Please Help Me. If you Can Help me to find out how to sort a 2d arrays of characters with [U]recursive bubble[/U] sort algorithm. I have got something but it doesn't work. what is my mistake? I Did codes below So far, but it …

Software Development algorithm c++
Member Avatar for cikara21
0
802
Member Avatar for lonely_girl

Hi. Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. …

Software Development c
Member Avatar for lonely_girl
0
145
Member Avatar for Trendkiller

I can't find the error and also C2182 error: illegal else without matching if. [code=c] #include <stdio.h> int main (void) { int count=0; //counter int hours; //hours char choice; //users choice for continuing float total=0; //total charge //print display printf ("%-15s %-10s %-10s","Customer","Hours","Total Charge"); //assinging customer number count++; //ask for …

Software Development c
Member Avatar for me_ansh
0
331
Member Avatar for me_ansh

Hello every one, I have a confusion regarding arrays and pointers, My question is: "Is array name a pointer (rather a constant pointer)"?? I feel the answer is 'yes' because we can use the de-referencing operator(*) with the array name, Also, because array name is a constant pointer so we …

Software Development c
Member Avatar for Narue
0
266
Member Avatar for madrang

Hi, i'm making my own game engine on sdl + opengl i also know that i can manage file for my setting and save game that way (i am on windows) [code] #include <windows.h> void ini::setfile(std::string name) { name += ".ini"; std::string directory; char path[1024]; GetModuleFileName(NULL, path, 1024); directory = …

Software Development c++ opengl
Member Avatar for madrang
0
109
Member Avatar for thehivetyrant

[B]Hi i've been assigned with doing a torn square, and i've kinda got it working with the code below.[/B] [code] import turtle turtle.reset() length=100 degree=60 i=0 while i < 4: turtle.forward(length/length*40) turtle.right(degree) turtle.forward(length/2) turtle.left(degree+degree) turtle.forward(length/2) turtle.right(degree) turtle.forward(length/length*40) i+=1 turtle.right(90) else: raw_input("there's hopefully a square, all torn like!") [/code] as you …

Software Development python
Member Avatar for thehivetyrant
0
493
Member Avatar for knowledgelover

Hi there, Can C# code , execute commands we write in the cmd window ? i.e: is there a way to let a C# application interact in somehow the command prompt? example : we use the command prompt line: ipconfig to see info about the IP address of the machine, …

Software Development c#
Member Avatar for knowledgelover
0
519
Member Avatar for jhonnyboy

Hey guys im making a simple program. I have a while loop that continues while the bool quit ! = true. I am trying to test that in a statement like this: [CODE] String userdecision = ""; while (quit!=true){ //start while System.out.print("Would you like to continue with another transaction?"); [B]userdecision=in.next();[/B] …

Software Development java
Member Avatar for jhonnyboy
0
141
Member Avatar for vartikachandra

code:: [code] import java.io.*; import java.util.*; public class Global{ public static int flag=0; } interface filebackedfifoqueue { void put(String msg); String get(); } public class trying{ public static void main(String args[])throws IOException{ int ch=1; String msg; msg = new String(); while(ch!=0) { BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\nMenu"); System.out.println("\n0.EXit"); System.out.println("\n1.Publisher"); System.out.println("\n2.Subscriber"); …

Software Development java queue
Member Avatar for vartikachandra
0
111
Member Avatar for mrpoate

Hi, I'm currently working on a project in Python 2.6.1 using the Tkinter interface, and being new to both Python and Tkinter I've quickly found a problem that keen internet trawling hasn't seemed to help. I'm sure its not a particularly difficult problem or anything, but instead of spending probably …

Software Development python tkinter
Member Avatar for mrpoate
0
135
Member Avatar for Teethous

Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. …

Software Development c++
Member Avatar for Comatose
0
108
Member Avatar for Manutebecker

Which is in higher demand in the job market right now???

Software Development c c# c++ java
Member Avatar for Manutebecker
0
112
Member Avatar for ademsaykin

[code] #include <iostream> using namespace std; struct Mytime { int hours; int mins; }; int timecmp( Mytime t1, Mytime t2 ) // compares two Mytime values { if (t1.hours == t2.hours) { if (t1.mins == t2.mins) { return 0; // returns 0 if times are same } else // mins …

Software Development c++
Member Avatar for Murtan
0
189
Member Avatar for ryan311

hi can anyone help me about my problem how can i come up w/ this solution for example 1 + 2.00 the answer should 3.00 or like this 1.35+2.00 the answer should 3.35 how can i do this?

Software Development visual-basic
Member Avatar for QVeen72
0
118
Member Avatar for culebrin

Greetings folks, I need to load a word document file into a RichTextBox component, It can't be done directly, so, I need first, convert it to a RichText Format File and then load it to the component. Any Ideas? Thanks Omar

Software Development visual-basic
Member Avatar for Comatose
0
419

The End.