132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for psdao1102

[CODE]#include <fstream> #include <iostream> #include <cassert> using namespace std; int main() { ifstream inFile; ofstream outFile; inFile.open("file.txt"); assert(!inFile.fail()); cout << "everythings fine" << endl; cin.ignore(); cin.get(); return 0; }[/CODE] This is my current code, file.txt doesnt exist. The program simply crashes. I was hoping for an error message explaining what …

Software Development c++
Member Avatar for Ancient Dragon
0
118
Member Avatar for SpyrosMet

Hello. I'm a newbie and i was wondering if anyone can tell me how to create an array that contains objects and number 0 wherever there is no object. Thanks in advance

Software Development c++
Member Avatar for kvprajapati
0
122
Member Avatar for atticusr5

Hello everyone, I am a C++ newbie and I am running into some linking errors. I am using Vi to compile and link my code. Here are the linking errors: assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x1db): undefined reference to `cAccount::cAccount()' assign6.o: In function `cAccountList::cAccountList()': assign6.cpp:(.text+0x22b): undefined reference to `cAccount::cAccount()' assign6.o: In …

Software Development c++ ios
Member Avatar for Ancient Dragon
0
112
Member Avatar for shadwickman

Hello, I was wondering how to go about having a redirect of stdout with Python take effect in a C extension. My python script redirects sys.stdout into a file handle created with [i]open(...)[/i], but within the function in my compiled C-extension, any output ([i]printf[/i], [i]puts[/i], etc) is still given to …

Software Development http-protocol python
Member Avatar for Gribouillis
0
604
Member Avatar for scott__

hello, this is my first post on this forum! i have a strange bug that i get when using the player/stage project. I have compiled it with the MinGW compiler and it works fine on my vista laptop. However, on a lower spec XP PC it segfaults. Using GDB, i've …

Software Development assembly
Member Avatar for scott__
0
181
Member Avatar for atticusr5

Hey everyone I am writing some code for my c++ class and in this program I am trying to sort back account information by there accountID #'s. When I try to compile, here are the errors I get: assign6.cpp: In member function ‘void cAccountList::sort_by_ID()’: assign6.cpp:110: error: ‘accountID’ was not declared …

Software Development c++ ios
Member Avatar for Narue
0
143
Member Avatar for sadhramani

[code] int do_openFile(void) { char *p ; /* pointer to outFileName */ char *m ; /* pointer to report date */ char *mon; /* month number in report date */ /* get output file name */ m = pk->CNCRptdate; m += 2; strncpy(mon, m, 2); p = outFileName ; strcpy(p, …

Software Development c++
Member Avatar for Narue
0
155
Member Avatar for calccrypto

how do i get this code to stop referring to its present value, so that the values already saved in the list are not changed to the present value? [CODE] Cm = 0x5A827999; Mm = 0x6ED9EBA1 Cr = 19; Mr = 17 Tm = [[0]*8]*24 Tr = [[0]*8]*24 for i …

Software Development python
Member Avatar for calccrypto
0
68
Member Avatar for Szabi Zsoldos

I would like that case 1: should display how many elements do i want, and that i can assign values to those elements. Mine because of the j++ goes infinite, so i can enter infinite values to infinite arrays. How could i do this? Cate elemente vrei sa adaugi: 3 …

Software Development c++
Member Avatar for Szabi Zsoldos
0
561
Member Avatar for noey699

Every thing works perfectly only it will not check for a full house. Ive tried to figure out what the problem was by rewriting pair checking and three of a kind checking but the same result always. The function simply returns an integer corresponding to the hand stength given a …

Software Development algorithm c++
Member Avatar for noey699
0
151
Member Avatar for lrh9

I've seen these in documentation, namely in the "importlib" documentation for Python 3.1, and I'm wondering what the difference is between a "universal newline" and a "standard newline", if any. I know it has to do with the byte sequence that is used to represent newlines, and I think universal …

Software Development python
Member Avatar for HiHe
0
174
Member Avatar for Zay

Hello; can we give the variable in struct an initial values ? ex: struct example{ int id; float gpa; string name; }; can we but this inside the structure : int id=34440; the same Q is for the Class ? can we intialize the variable when definr it for the …

Software Development c++
Member Avatar for mrnutty
0
100
Member Avatar for killerbeat

hi al, i have a webbrowser component that refreshes every 5 sec, but when it refreshes you hear the *click* sound. But how do i disable that

Software Development vb.net web-browser
Member Avatar for Thyoric
0
609
Member Avatar for hypnos4

Hello, I've got a problem with my project... in short I've got a mysql db bond through a DataSet and BindingSource - if I'm editing like a user the gridview then all changes are commited to the db no problem... But I need the user to responsibly change foreign keys …

Software Development c# dataset mysql vb.net
Member Avatar for kdcorp87
0
338
Member Avatar for selenask

Hello, Im trying to create file . I'm almost done my program but Im getting this error. The method read() is undefined for the type Scanner

Software Development java
Member Avatar for selenask
0
94
Member Avatar for ithelp

Hello C experts, I am searching for a tool which can validate content of printf (static string part) against an english dictionary , have anyone of you come across such tool , here is the example to clarify. [code=c] printf("The value of the interface identifier is %d",i); printf("This intarface is …

Software Development c
Member Avatar for Dave Sinkula
0
97
Member Avatar for phoenix69

Hi there... I am a new member here. If my request is not appropriate anyone can delete it. I desperately need help with my school work. I have been doing this for about a week but still don't get how to do. This is a big programming work, so I …

Software Development c
Member Avatar for peter_budo
0
1K
Member Avatar for capiono

I am trying to switch between to form in different project currently I am going this: [CODE] this.Hide(); form2 f= new form2(); f.Show();[/CODE] the new instance of form2 throws a null exception error. But I think because form2 is not active. How do I work around this or is there …

Software Development
Member Avatar for kdcorp87
0
94
Member Avatar for falcon60

Hello. I'm new to C++ and I just learned how to use vectors and lists and indices and iterators, but i'm confused about iterators. Mainly, why should I use them instead of indices? They seem to add more complexity to accomplish the same thing as using indices... so could someone …

Software Development c++
Member Avatar for Salem
0
73
Member Avatar for OldQBasicer

Is there a way to wrap the text on the list box items, i.e. go to the next line, when they're too long for the box. A few of my items are too long to fit, so they are truncated.

Software Development vb.net
Member Avatar for OldQBasicer
0
167
Member Avatar for Ap0ca1ypse

Hello, I have created a program and i have managed to publish my application. I have set it up to be installed via CD but it does not attach the MSAccess DB. My question is how do I add the DB?

Software Development vb.net
Member Avatar for Ap0ca1ypse
0
146
Member Avatar for rocky289

I have been asked to create a student database using linked list. this is the question given to me. Write a C/C++ program to perform the task of maintaining student information for 123 College. You are to use a linked-list for storing the students’ information. Each node of the linked-list …

Software Development c linked-list
Member Avatar for Salem
0
7K
Member Avatar for Dizzzy

Ok i have a char with ''/afile.html" assigned to it. The extensions of it can vary so i need to get the extension to a seperate char to compare it with something else il show you what i have.... Basically i need everything after the '.' [CODE]char resource[16]; n = …

Software Development c c# c++
Member Avatar for Dizzzy
0
141
Member Avatar for SpyrosMet

the error by the compiler is [code=text]Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe Untitled1.o plants.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" Untitled1.o(.text+0x182):Untitled1.cpp: undefined reference to `Plants::Plants()' collect2: ld returned 1 exit status make.exe: *** [Project1.exe] Error 1 Execution terminated[/code] main code is [code]#include <iostream> using std::cout; using …

Software Development c++
Member Avatar for SgtMe
0
132
Member Avatar for fardoonmuhafiz

If a class doesnt override toString() method and tries to print out the object like this: //some class [code] public class SomeClass1{ int x=4; } //another class class DemoOftoString { public static void main(String[] args) { SomeClass1 o=new SomeClass1(); System.out.println(o); } } [/code] output:SomeClass1@hex version of object's hash code ------------------------------------------ …

Software Development java
Member Avatar for fardoonmuhafiz
0
101
Member Avatar for C++ Beginner

Problem: Write a pgoramthat uses a structure to store the following information: Name, IdNum, Test1Score through Test4Score, average, and grade. function to ask the user for student's name, etc. The average score should be calculated and stored in the Average member of the structure should be calculated in their own …

Software Development c++ data-structure
Member Avatar for C++ Beginner
0
374
Member Avatar for Aiyen

Hello all, great forum that have been a great source of information for me over the past many weeks. So now I decided to join up. I am currently trying to write a partial sum function as part of a much larger program I once wrote in Fortran. I am …

Software Development c++
Member Avatar for Aiyen
0
94
Member Avatar for jemz

hello please help me on this how to write on notepad....example input your first name input your last name input your middle initial input your address input your age this should be the ouput in notepad after inputting the data and this should be proper align .thanks in advance..hoping for …

Software Development java
Member Avatar for javaAddict
0
3K
Member Avatar for cebubismac

I have a Samsung Ellix 20 Thermal Parallel Printer. Can you please send me some programming sample commands using VB6? Please help me. Thank you.

Software Development printer visual-basic
Member Avatar for vb5prgrmr
0
193
Member Avatar for SpyrosMet

Dev cpp gives me the error 18 C:\Dev-Cpp\Untitled1.cpp request for member `setStats' in `plant1', which is of non-class type `Plants ()()' And the same for line 19. Please someone tell me what's wrong. I'm a noob at c++. Thanks in advance. #include <iostream> using std::cout; using std::cin; using std::endl; #include …

Software Development c++
Member Avatar for SpyrosMet
0
359
Member Avatar for jemz

hello please help me on this how to make the first letter of each word in uppercase.hoping for your positive responds...thanks in advance

Software Development visual-basic
Member Avatar for jemz
0
102
Member Avatar for abhimanipal

Is there any standard rules when we write the main function. I always thought the main function should always be written as [code=c] int main(int argc, char* argv) { ..... return 1; } [/code] But to my surprise, all these definitions are also correct . I got a compile time …

Software Development c
Member Avatar for Narue
0
243
Member Avatar for mmasny

If we have three classes A,B,C declared as follows: [code=C++] class A{ protected: int x; }; class B : A{ //... }; class C : B{ //... }; [/code] does class C see its member x? It seems to me that it doesn't according to what the compiler says to …

Software Development c++
Member Avatar for Fbody
0
127
Member Avatar for Chetan_

Hi! I'm making a graph generator. Most is done but the only problem is that when i'm doing the 2nd or 3rd graph in the same session, the graph collapses . and after the end of execution of the program, i get "Null pointer assignment" I tried debugging but i …

Software Development c++ session
Member Avatar for mitrmkar
0
200
Member Avatar for tqmd1

Dear Developers SQL, Table CODE has data as following Code------product 1-----------Mango 2-----------Potato 3-----------Orange SQL, Table SALE has following data Code------Product 2----------- 3----------- I want to fill sale.product column with code.product columns as Code------Product 2-----------Potato 3-----------Orange What query should I USE? Please help

Software Development vb.net
Member Avatar for tqmd1
0
144
Member Avatar for qadeer37

[code] interface Cricket { public void Pitch (String type); public void Seats (int num); } class Arrangement implemets Cricket { public void Pitch (String types); { System.out.println (types); } public void Seats (int nums) { System.out.println (nums); } } public Class Match { public static void main (String arg) { …

Software Development java user-interface
Member Avatar for stultuske
0
170
Member Avatar for smarty_t2

Can someone please tell me the difference between Class and Structure in C++ ??? I cant find any..!! Thanks

Software Development c++
Member Avatar for jonsca
0
101
Member Avatar for yasin.mr

hi guys a beginner here. can i get some help ? how do i prevent error for eg. i only one Y/y or N/n to be written and when other characters or integers are written, it will show an error message. the default doest seem to be working switch(Confirm) { …

Software Development java
Member Avatar for yasin.mr
0
287
Member Avatar for isralruval

This code you are asked to input a number and it will tell u wheter or not the input you entered is in the array or not i am having issues with this code and its giving me some errors, if anyone wants to help me out it will be …

Software Development c++
Member Avatar for jonsca
0
116
Member Avatar for Servet Yekta

Hello everyone, I'm trying to improve myself on Winsock , so I wrote a code which can get the content of an website.Now I'm trying to post (upload) a file to a http website.Here is my code , what should I add to my code to work with POST? Thanks …

Software Development c c# c++ http-protocol
Member Avatar for Servet Yekta
0
192
Member Avatar for anishakaul

Hi, I have managed to create a HTML file inside python code, now can someone help me to convert this to a PNG file through a Python script ?? I did Googling first but it resulted in various soft wares for above purpose which I don't want !! I am …

Software Development html-css python
Member Avatar for anishakaul
0
3K
Member Avatar for xavier666

[B]Here is the sample program[/B] [CODE]# include <stdio.h> # include <stdlib.h> // COMPILER : GNU GCC COMPILER // EDITOR : CODE::BLOCKS 8.02 struct test { int data; struct test *link; }; void change(struct test *ptr); int main() { struct test *fresh = (struct test *)malloc(sizeof(struct test)); int some_data = 10; …

Software Development c data-structure
Member Avatar for xavier666
0
145
Member Avatar for hket89

How to generate a pair of random number from 1 to 8 that can fill into a 2D array in a 4x4 square? For example: 2 3 5 6 1 7 8 3 5 4 1 6 7 2 4 8

Software Development java
Member Avatar for hket89
0
257
Member Avatar for hket89

How to generate a pair of random number from 1 to 8 that can fill into a 2D array in a 4x4 square? For example: 2 3 5 6 1 7 8 3 5 4 1 6 7 2 4 8

Software Development java
Member Avatar for hket89
0
134
Member Avatar for mvignesh31

hi i want to translate the single letter aminoacid code to triple letter code. how can i do that using tr///; command. can any one help me.

Software Development perl
Member Avatar for mvignesh31
0
246
Member Avatar for Katherine692008

Hello, I'm currently stuck on this program and wondering if I can find assistance > This programs should prompt users to > enter number(s) (integer(s)) <enter> multiple scores on the same line > see a grade(s)<enter> > then see a sum of the grades entered (abcdf). > > > It …

Software Development java
Member Avatar for Jhonjay123
0
777
Member Avatar for soteri0s

Hello everyone, I'm trying to compare Strings in a Linked List that were input by user and return the smalles(lexicographically) to the console. Any help is appreciated. ** actual method [CODE]public String smallest() // Returns smallest String in StringLog in terms of lexicographic ordering. //Precondition: StringLog is not empty. { …

Software Development java linked-list
Member Avatar for BestJewSinceJC
0
725
Member Avatar for Austinjs0102

Alright i need some help, been stuck on a basic task. I input 2 strings. I need to be able to have it compare the two strings to see which one is shorter, then count how short the item is and out put the number. ex. Word 1 Hello word …

Software Development java
Member Avatar for BestJewSinceJC
0
84
Member Avatar for a1eio

Hi, I was wondering how someone would go about making a scrolling ticker or marquee using Tkinter in such a way that allows you to easily add on text and remove.. kinda like a news scroller on the bottom of the tv? thanks all a1eio

Software Development python tkinter
Member Avatar for donnie6680
0
1K
Member Avatar for moroshko

Hello, I created a new Windows Application and added a Panel to the Form. But, I don't see the MouseWheel event of the Panel. Panel derives from Control, which has the MouseWheel event. So why Panel does not have the MouseWheel event ? Thanks !

Software Development
Member Avatar for xiehuanxie
0
3K

The End.