49,757 Topics

Member Avatar for
Member Avatar for missscareall

Hello to everybody, I am a c++ beginner, and I want to do a program that reads a file with a column with numbers, "finds" the repeated numbers and write the repetitions on other file. For example, I have a file like this: Input file: 6 5 4 4 7 …

Member Avatar for Saith
0
152
Member Avatar for Rickay

I'm not really sure what the proper forum for this is. Basically, I have compiled a small program (written in C++) that I want to execute. It first creates an AppleScript, then runs it. But, when the program is run (it is a 'Unix executable file'), I want to to …

Member Avatar for Rickay
0
262
Member Avatar for custurd122000

compiles there are no errors but it only outputs part of the desired output and then exits in a segmentation fault This is the output its printing out [code] Input is: 25 10 - 100 115 - - 300 2 5 * / / Contents of input queue: 25 10 …

Member Avatar for custurd122000
0
164
Member Avatar for peq

Don't know how to approach this problem, here's what I have so far, any help would be greatly appreciated. PROBLEM : Modify the function days() written for exercise 1 to account for the actual number of days in each month. Assume each year contains 365 days( that is do not …

Member Avatar for Narue
0
91
Member Avatar for Rickay

[CODE]double speedTest() { double dInitialTime = clock(), dFinalTime = 0; double dRepititions = 99999999; double dResult; cout << "\nCalculating...\n\n"; for(int nCounter = 0; nCounter <= dRepititions; nCounter++) { pow(dRepititions, pow(dRepititions, dRepititions)); } dFinalTime = clock(); dResult = dFinalTime - dInitialTime; ofstream outf("Results.dat", ios::app); outf << dResult << endl; return dResult; …

Member Avatar for Rickay
0
5K
Member Avatar for dvidunis

hi i know there is a lib for mysql in c++, but i can't seem to install it properly! someone has a place i can find a tutorial for mysql for: Windows XP, Codeblocks. thx for helping. Checklist for Fast Responses: 1: Search before you post. Does what you're looking …

Member Avatar for Narue
0
271
Member Avatar for centerline00

OK, I have been out of the loop with C++ for a year now. I am finished with school, so this is NOT homework. Just trying to clean up some old assignments for future references. (the code is in "messy" shape til I can get it working properly and clean …

Member Avatar for centerline00
0
85
Member Avatar for goocreations

Hi I'm looking for an efficient way of converting an array of integers to an array of doubles. Currently I'm doing this: [CODE]int *a = new int[1000]; //And then assign values to the indexes double *b = new double[1000]; for(int i = 0; i < 1000; i++) { b[i] = …

Member Avatar for mrnutty
0
5K
Member Avatar for jimmymack

[CODE]// Listing 14.4 // Add Function #include <iostream> class Counter { public: Counter(); Counter(int initialvalue); ~Counter() {} int GetItsVal()const {return itsVal; } void SetItsVal(int x) {itsVal = x; } Counter Add(const Counter &); private: int itsVal; }; Counter::Counter(int initialValue): itsVal(initialValue) {} Counter::Counter(): itsVal (0) {} Counter Counter::Add(const Counter & rhs) …

Member Avatar for jimmymack
0
141
Member Avatar for Saddi

Well i'm beginer in c++ programing languages, what I need to know is, What is the partations of c++? What kind of programmes I can built with? And why it's the best programming languages?

Member Avatar for jonsca
0
117
Member Avatar for v_janssens

Hi, I have a C++ program (built in Visual Studio 2010) and want to add a user interface to package it up. I've been reading around about windows forms and the win32 API, and found loads of tutorials showing how to create interfaces but I can't find any advice on …

Member Avatar for NicAx64
0
850
Member Avatar for dadam88

Hey all, I just wanted to know if I should use a different process to run my loop. I use a while loop until the AI figures out the number. I know there is a more efficient and easier way to make this loop happen with BOOLEAN. Setting while(bool = …

Member Avatar for dadam88
0
198
Member Avatar for pcgamer2008

Hello World ! Can anyone tell me how to put a '+' character at the screen centre in 3D World space..It should stay at the centre while moving camera..I don't want to use glutWarpPointer()...anyone who can tell me ..when I move my camera it must be at the screen centre..

Member Avatar for pcgamer2008
0
112
Member Avatar for Ahmed sunny

Write a program that emulates the DOS COPY command. That is, it should copy the contents of a text file (such as any file) to another file. Invoke the program with two CPP command-line arguments—the source file and the destination file—like this: C>ocopy srcfile.cpp destfile.cpp In the program, check that …

Member Avatar for Arbus
0
951
Member Avatar for wildplace

so..i found this on wikipedia but i dont really get what dist, previous, alt mean in here.. [CODE] 1 function Dijkstra(Graph, source): 2 for each vertex v in Graph: // Initializations 3 dist[v] := infinity ; // Unknown distance function from source to v 4 previous[v] := undefined ; // …

Member Avatar for mike_2000_17
0
218
Member Avatar for s11049151

hey, I have to write a program that asks the user for an input amount (in cents) and the highest denominations of change (1c,5c,10c,20c & 50c). With these 2 inputs, the program then finds the distinct ways in which the change for the given amount can be made using the …

Member Avatar for daviddoria
0
268
Member Avatar for trebor-pl

Hi, just finding out about making a program that will switch my monitor mode from DVI to HDMI and backwards. Is there any of you guys that done similar thing? Is there a possibility to guide me where to start my research and coding. thanks for help anyway

Member Avatar for pseudorandom21
0
75
Member Avatar for Amr ElGohary

Design and develop a program for balanced delimiters checking . Use the stack class defined in STL. Your program should take from the user the name of the C++ program he wants to check and then opens it and processes its text and issues a message saying that: You the …

Member Avatar for WaltP
0
148
Member Avatar for Amr ElGohary

please if any one knows howa to solve this problem Write a program that asks the user for the level n that he wants and creates the Farey sequence as a linked list of fractions of level 1, then extends it to level 2, 3,...n. Below are input/output samples: Input …

Member Avatar for Amr ElGohary
0
58
Member Avatar for piecykoos

Hi there, I have been given this question to complete but I can't seem to get my code working properly. I'm very new to C# so sorry if i come across as stupid! Here is the question... Create a class that represents the grade distribution for a given course. In …

Member Avatar for YouGotCaught
0
1K
Member Avatar for cppgangster

Hi dudes, does anyone know where is the problem this my code: [CODE]void CMyListBox::loadSources(CMyListBox::eInputMode eMode,const std::vector<wchar_t>& coll) { wchar_t *pBuffer=new wchar_t[coll.size()]; std::copy(coll.begin(),coll.end(),pBuffer); wchar_t zodis[20]; while (swscanf_s(pBuffer,L"%s",zodis,20)) MessageBox(zodis); }[/CODE] the imput(pBuffer) is this string "šešios žąsys su šešiais žąsiukais." swscanf_s only keeps reading the same word "šešios" ...

Member Avatar for Narue
0
151
Member Avatar for dvidunis

hi, first of all im noob and 11 years old so don't blame me if something is wrong! i try to read a txt, see a version, read a txt on a server, see if on server newer and ask to update if yes. any suggestions? Oh and in C++ …

Member Avatar for \007
0
157
Member Avatar for gaten

Hi, What can I create a list? I would like to know how to insert items in a list. I wrote this code [CODE] void addElem(lista *&head, int elemento){ if(temp == NULL){ head=new lista; head->value=elemento; head->link=NULL; temp=head; }else { lista *new_node=new lista; while(temp != NULL){ temp=temp->link; } new_node->value=elemento; new_node->link=NULL; temp=new_node; …

Member Avatar for NathanOliver
0
35
Member Avatar for ThrustinDuffman

Hello. I have been out of programming in C++ for about a year now (around the time I took my last C++ class) and I am wanting to get back into it. So I decided to make a rock, paper, scissors game to refresh my memory but I am running …

Member Avatar for Narue
0
90
Member Avatar for ankit.4aug

[CODE]#include<stdio.h> #include<iostream.h> int main() { int x,y,z; x=y=z=5; z=++x||++y&&++z; printf("x=%d,y=%d,z=%d",x,y,z); } [/CODE] why the output is x=6,y=5,z=1?? shouldn't it be x=6,y=6,z=1

Member Avatar for arkoenig
0
199
Member Avatar for noctiskram

the only problem in this code is i must use longer username and password like for example dani and the password is web, not d and w only. this is very easy but i didn't make it, please help me with this. In this program, after you log in you …

Member Avatar for arkoenig
0
870
Member Avatar for superjj

Hi I'm working on a project. i'm using c++ gui windowns forms. when people press the red cross, then the program need to do something before exiting the program. can someone tell me how to make this. what event I need to use. thanks in advance

Member Avatar for superjj
0
130
Member Avatar for jimmymack

// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theName, std::string theClass); void teach(); void introduce(); protected: …

Member Avatar for jimmymack
0
135
Member Avatar for fclopez

Hi , A simple stupid question: I am to read the contents of a file that goes this way RXbytes = 0 b TXbytes = 0 b RXbytes = 3 Kb TXbytes = 2 Kb RXbytes = 119 Kb TXbytes = 6 Kb RXbytes = 189 Kb TXbytes = 5 …

Member Avatar for jonsca
0
482
Member Avatar for montjoile

hi. Im trying to make an expresion tree for every ER that I read each ER will be transformed into postfix and saved in a string, which I'll be sending to arbol_expresion() to create it`s tree expression Searching on the web I found a method to convert the postfix expresion …

Member Avatar for abhimanipal
0
130

The End.