49,757 Topics

Member Avatar for
Member Avatar for jimJohnson

I have a quick question about posting. I am retaking over my final C++ class and still have the programs from the class. Even thought the class is a month away I am planning on working on them early. Would there be anything wrong with posting about each piece of …

Member Avatar for Narue
0
88
Member Avatar for vanalex

Hello everybody! I wrote the following classes: OilStation: [CODE] class OilStation : public Date{ protected: int code; char *Address; float Amount[K]; public: ... }; [/CODE] and Price: [CODE] class Price : public OilStation { public: Price(){} void changeAmount(); ... }; [/CODE] In changeAmount function i try to change the elements …

Member Avatar for vanalex
0
79
Member Avatar for Dizzzy

Ok so ive been writing code for a web server to return requested files, It works well for html and txt files but when an image is requested all i recieve is the url of the file... In firefox in conqueror i dont get anything. All i do is read …

Member Avatar for NicAx64
0
263
Member Avatar for dipproject

Can any1 help me too debugg this program..........pls........... if possible post d debugged program here itself or mail it to me <<>> thank u in advance :) the following is a program of edge detection in an image..........i m gettin errors in both dev C++ and Code blocks [code] #include<iostream.h> …

Member Avatar for NicAx64
-4
133
Member Avatar for jaffar_ramnad

hi every one,i am a new guy for Mfc Socket programming . tell me ,what are the best books available for Mfc socket programming (Csocket).

Member Avatar for ashishchoure
0
72
Member Avatar for neuro

Hi, I'm very interested in neuroimaging research and I'm applying to cognitive neuroscience PhD programs for next fall. I'm hoping to increase my proficiency in several computer programming languages because I know how important they are for neuroimaging research. Specifically, I'd like to learn C++ for MATLAB. It might be …

Member Avatar for AndreRet
0
68
Member Avatar for Peter_morley

Hello I'm trying to pass a key array to a function in another class and its not working. Can anyone explain to me essentially what the key array is? Is it an array of char? Well anyways here is my code I'm getting errors please help. Thanks HERE IS MY …

Member Avatar for vinayakgarg
0
206
Member Avatar for vinayakgarg

Hello I am developing my first game in Allegro. Till now i found it easy to use. But now i read that for running a game allegro.dll is required on computer. Tell me if it is correct. Also many people say that SFML is better than Allegro, since the latter …

Member Avatar for vinayakgarg
0
277
Member Avatar for Reverend Jim

When I try to build a C++ project I get the error message in the title line. I am trying to help my son move his development from a unix cluster to his laptop. He is running Windows XP Pro and has installed the Eclipse IDE for C/C++ Developers. The …

Member Avatar for nezachem
0
4K
Member Avatar for EngSara

Hello.... I am running a C++ program that takes an N array and reads a from a file. One requirement of this project is that it returns an elapsed time of each function so the function efficiency can be calculated based upon an input. I am attempting to implement the …

Member Avatar for menauman
0
6K
Member Avatar for gpta_varun

Hi All We all have read a lot about utility of copy constructor. I have a simple question .Consider the code below. Is it ok to directly copy one object's content onto other ? [CODE] Class A { ...... }; main () { A * obj_1=new A(); // Next the …

Member Avatar for Fbody
0
159
Member Avatar for Mr_PoP

[CODE] #include "includes.h" int main() { SYSTEMTIME st; GetSystemTime(&st); ofstream syslog; //st.wDay= 30 syslog.open("today"st.wDay".txt"); syslog.close(); system("Pause"); } [/CODE] bt idk how to make it this line is completly wrong syslog.open("today"st.wDay".txt"); can anyone help me :)

Member Avatar for Mr_PoP
0
82
Member Avatar for alexandernst

I'm trying to convert LPWSTR to LPSTR withi this: [CODE] LPWSTR *argvw; int argc; argvw = CommandLineToArgvW(GetCommandLineW(), &argc); LPSTR argv = new CHAR[argvw->size()+1]; WideCharToMultiByte(CP_ACP, 0, argvw->c_str(), -1, argv, (int)argvw->size()+1, 0, 0); [/CODE] but I'm getting this: [CODE] main.cpp:14: error: request for member 'size' in '* argvw', which is of non-clas …

Member Avatar for Ancient Dragon
0
581
Member Avatar for totalwar235

i am just trying basic C++ GUI and i ran this code from a tutorial site. [CODE] #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLine, int iCmdShow) { MessageBox(NULL, "Hello World", "Testing", 0); return 0; } [/CODE] when i run it, it executes and makes a animation of …

Member Avatar for totalwar235
0
111
Member Avatar for EngSara

Hi, I need to store each path in a tree as a row in a two dimensional array of size #of paths x N. I couldn't find the appropriate indexing scheme for the array. Any ideas would be appreciated. Thanks,

Member Avatar for vijayan121
0
2K
Member Avatar for ObanaJunichiro

Anyone here can help me with Boyer Moore algorithm? Im study lots of code and example for couples of hour already and yet i cant figure it out how does the Boyer Moore algorithm works.. It really too complex for me .Can anyone give me a sample code or perhaps …

Member Avatar for griswolf
0
99
Member Avatar for DrMAF

I'm new to C++ programing. the compiler can't find "atlstr.h" to include. I searched alot for this file but I couldn't find. Please, and body knows how to find it , tell me ASAP.

Member Avatar for DrMAF
0
4K
Member Avatar for Juginx

Hey I have problem... If i save playlist with 1 item then it work but if i have more then it bug. i can start debugging. [CODE]XmlTextWriter ^textWriter = gcnew XmlTextWriter(dig->FileName, nullptr); textWriter->WriteStartDocument(); for(int i=0; i < listBox1->Items->Count; i++){ textWriter->WriteStartElement("track"+ i); textWriter->WriteStartElement("url", ""); textWriter->WriteString(listBox1->Items[i]->ToString()); textWriter->WriteEndElement(); textWriter->WriteStartElement("name", ""); textWriter->WriteString(listBox2->Items[i]->ToString()); textWriter->WriteEndElement(); textWriter->WriteStartElement("start"); …

Member Avatar for kvprajapati
0
138
Member Avatar for ivan26

Can anyone help me solve this problem? pass by reference/value and file i/o should be used.. Write a C++ program which will read in a list of numbers, find the average of all numbers, the average of thepositive and negative numbers, and the largest element. Your program should contain at …

Member Avatar for floatingDivs
1
236
Member Avatar for jagaur

hello everyone i am trying to make a list that contains name with following option add till name write out names in the list remove name from the list sort the list look efter a name from the list save the list to a file please i will appreciate if …

Member Avatar for WaltP
0
192
Member Avatar for linova

Hi, I have a text file with characters. I must able to read the length of characters in the file by every line and count the frequency of each characters for each line. I have tried on writing this program but this does not work. Can anyone help me on …

Member Avatar for WaltP
0
247
Member Avatar for bensewards

Hey guys, This is my first official post on DaniWeb :) I am new at programming in C++ using visual studios, and right now I am fooling around with storing user input into Arrays. I am having a problem with my code, using an array size of 3 to store …

Member Avatar for jonsca
0
209
Member Avatar for Mr_PoP

Hi there i wanna make a query like this [CODE]SELECT * FROM accounts[/CODE] accounts table has 3 columns ID Name Password so i wanna get every column value in variable like char name= column[name]; so i can cout << name ; is there away to do it?

Member Avatar for Mr_PoP
0
72
Member Avatar for alexchen

I cannot copy 2d array. There are no errors in my error list. What is wrong with my code? The problem might be located in create(). Thanks in advance. Here is my code. [CODE]int **map void randomize(int numberToSelect,int range, int *list){ int* remainingNumbers = new int[range]; int* chosenNumbers = new …

Member Avatar for alexchen
0
108
Member Avatar for Juginx

hey. How to load and save to XML. xml like: [CODE][track1] name= url= starttime= [/track1] [track2].... [/CODE] and how to load only name to listbox without all link.

Member Avatar for jonsca
0
85
Member Avatar for seanbp

What are some hints or tips on writing efficient functions? I read about converting the code to assembly, and I've also read about the stack and functions. However, I fail to understand how data stored higher can be accessed before the end on a FIFO stack, as any local variable …

Member Avatar for vijayan121
0
104
Member Avatar for Juginx

Hey again ...:P Now i have problem with save & load from/to text file. [CODE]private: System::Void zaƂadujPlaylisteToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { OpenFileDialog^ dig = gcnew OpenFileDialog(); dig->Filter = "PlayList(*.PLS)|*.PLS"; if(dig->ShowDialog() == System::Windows::Forms::DialogResult::OK) { listBox1->Items->Add(IO::File::ReadAllText(dig->FileName)); } } private: System::Void zapiszPlaylisteToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { SaveFileDialog^ dig = gcnew SaveFileDialog(); dig->Filter = …

Member Avatar for jonsca
0
635
Member Avatar for miturian

So, this is probably a bit abstract, and I apologize if the title was imprecise: I have a simulation class, which contains a vector of objects of class A, the member functions of which depend on parameters a,b,c: [CODE] class SIMULATION { vector<A> array; }; class A { A(a,b,c); } …

Member Avatar for mike_2000_17
0
182
Member Avatar for narlapavan

2D vector data types should be different or same only .. for ex:: for one sub script with int data type and with another subscript with class name is it possible to declare with diff. data types

Member Avatar for Ancient Dragon
0
144
Member Avatar for Shayaan_Mustafa

Hi! my dear all. [CODE]#include<iostream.h> #include<stdlib.h> #include<fstream.h> #include<conio.h> #include<stdio.h> class payroll { private: char address[50]; float basic,allowence,deduction; public: void add(void); }; void payroll::add(void) { clrscr(); int e_no,choice; char name[50],ch; payroll e; cout<<"Enter Employe Number: ";cin>>e_no; cout<<"Enter Employe Name: ";gets(name); cout<<"Enter Employe's Address: ";gets(e.address); cout<<"Enter Employe's Basic Salary: ";cin>>e.basic; cout<<"Enter Employe's …

Member Avatar for Jason Giggs
0
858

The End.