49,757 Topics

Member Avatar for
Member Avatar for Galf

Hi guys, Design question: I have a class that contains 2 vectors, and I'd like for that class to provide a public interface to access the next element in either list. The easy way to do it is to obviously return the list itself, either const or not, but this …

Member Avatar for Galf
0
103
Member Avatar for nx86

I am trying to understand one C++ program, which has a loop written as follows: [CODE] for(int i = 0; i < (1<<m); ++i) { for(int k = 0; k < m; ++k) { if(i&(1<<k)) { //in subset } } } [/CODE] I do not understand how the loop control …

Member Avatar for WaltP
0
112
Member Avatar for skorm909

ok so if i have somthing like [CODE]#include <iostream> using namespace std; int main(){ int action; cout << "have this show up first" << endl; cout << "then have an if statement here" << endl; cin >> action; if (action == 1){ cout << "then have this show up but …

Member Avatar for WaltP
0
170
Member Avatar for miss_kruse

I'm having some trouble finding a place to put this question, since I don't have any insight in coding. Please let me know if the thread is misplaced, and I'll move it. Question: I have an idea of an app for iPhone/any smart phone and before I move on with …

Member Avatar for Talguy
0
113
Member Avatar for cowboyz209

hey i need help with writing a program where it lets a maker of chips and salsa keep track of sales...i have this so far but dont know what else to do. [CODE]# include <iostream> # include <iomanip> using namespace std; int getTotal (int [], int); int posOfLargest (int [], …

Member Avatar for WaltP
0
152
Member Avatar for blind122

My code converts roman numerals to the number values but i dont know how to make it do deciamls too, like for example: XX-X. I need it to recognize the "-" and start the loop again. How do i do that? Here is the code: [CODE]#include <iostream> #include <string> using …

Member Avatar for WaltP
0
256
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I have used Matlab to fill the rows or columns of a matrix with values from a vector and I'm wondering how to do the same thing in C++... I have written code that puts new values in a vector. This happens in …

Member Avatar for Lerner
0
249
Member Avatar for 1manik

Hi, I installed VC++ with SQL Server 2008, but I cant find SQL Server Management Studio application. Can you talk me why? Installation of all components was good and I can find other components.

0
47
Member Avatar for MonteM

Hello Every one, I am having trouble finding my correct condition to not run off the end of my file. So i am reading from a file and then tokenizing my data accordingly. My file has 16 lines and using my size function i get 18 lines instead since i …

Member Avatar for Fbody
0
138
Member Avatar for MTW1989

[CODE]include <cstdlib> #include <iostream> #include <iomanip> #include <stdlib.h> using namespace std; void printintromessage (); void getUserInput (char& Y); int main(int argc, char *argv[]) { const int numofgamesinseries = 3; const int numofplayersonteam = 4; int i, score[numofgamesinseries]; int j, players[numofplayersonteam]; char Y = Y; printintromessage (); getUserInput (Y); do { …

Member Avatar for MyrtleTurtle
0
261
Member Avatar for Jean88

I have been having various issues trying to figure out a very trivial problem. I've re-written this code now several times and used many different condition statements etc... One issue that i'm having right now is the input for the variable "paragraph" not being available, the paragraph input is skipped …

Member Avatar for Jean88
0
576
Member Avatar for Krzysztow

Hello everyone, I have a problem and almost found a solution, for example this: [url]http://www.parashift.com/c++-faq-lite/multiple-inheritance.html[/url]. However in my case I cannot solve it in a proposed way and will explain it shortly why... So basically, I have a BaseView, that derives from QWidget like this: [code=c] class BaseView: public QWidget …

Member Avatar for Krzysztow
0
84
Member Avatar for samanamuo

hi everybody, i would like to know how to computes and returns d2 – d1 d2 is passed to the function by reference and d1 is the implied calling object; date d1 is earlier than date d2 the function returns the difference between two date objects in terms of number …

Member Avatar for Banfa
0
388
Member Avatar for Pynolathgeen

I'm programming my own game at the moment, its connecting to a server and the server sends some spawn info and eventual other players who are connected. When a player moves, and an other player is also connected, the client of Player2 crashes. I don't know what is causing this, …

Member Avatar for Pynolathgeen
0
109
Member Avatar for Crow13

Hi. I know it's now rly allowed to post homework and stuff. But i just need some help, like hints, or examples. =] Don't fully understand how arrays(marked as mass in prog.) work yet. Arrays = massivs (in the countries language where i live) [ The point is to have …

Member Avatar for Crow13
1
109
Member Avatar for VilePlecenta

Example: [CODE] class foo { public: void DoNothing() { cfee.AddNothing(); } }; class fee { public: void AddNothing() { int a = 0; a += 1; } }cfee;[/CODE] Is there a way to call a function in a instance of a class that was declared after the creation of the …

Member Avatar for VilePlecenta
0
147
Member Avatar for em-kay

hello guys, i need ur help in converting NFA to DFA DFA Algorithm : s <- s0 { start from the initial state } c <- nextchar { get the next character from the input string } while (c != eos) do { do until the end of the string …

Member Avatar for em-kay
0
277
Member Avatar for XerX

Hello. I am asking for help. I have 2 input files containing sorted integers. These 2 have to be concatenated into a third file and now all the integers must be sorted. (Example: file1 contains 1 5 8, file2 - 2 3 6 and file3 must contain 1 2 3 …

Member Avatar for WaltP
0
153
Member Avatar for Superfreak3

Hi all, I'm really not at all experienced with C++, but I have some changes to make in code that used to be maintained by someone else. The code that exists may not be the best, but I'm not looking to totally re-write the widget because it works for us …

Member Avatar for Superfreak3
0
118
Member Avatar for ellaine101591

We have an assignment to convert infix to postfix. And I have made this initial code. When this program is executed, I'd type any word that is not an operator or '(' or ')'. For example my input is "asd" my output should be "asd" also. But in this code …

Member Avatar for emilo35
0
229
Member Avatar for micmagicfly

7. Write a simple C++ program that performs addition, subtraction, multiplication, division, exponentiation, base-10 logarithm, and factorial operations. The program should start with a menu letting the user to choose one of the eight operations the user wants to perform. A sample menu is given below (hint: use loop to …

Member Avatar for tetron
0
123
Member Avatar for d3mos

I'm a programming noobie, been programming for only a couple months. The other day I had the idea to write a small application where it would minimize Skype automatically after a call was terminated or over. I have no experience using API so I've been doing my research on the …

Member Avatar for d3mos
0
212
Member Avatar for anugrah.agrawal

i want to develop a c++ program that may take a visual input like a graph and then manipulate it to find whether its a planar graph or not....i am well versed with the algorithm to do this...just want to know that how can I read the input from a …

Member Avatar for anugrah.agrawal
0
160
Member Avatar for dchunt

I've written a few simple C++ programs in Dev-cpp... Now i want to run the second program inside the first in case it satisfies a condition. It then geneerates a text file from which new values are got. Is it possible to do that ? I'm just a beginner and …

Member Avatar for tetron
0
154
Member Avatar for DrueY

Hi there, Could someone give me a simple of example of how to write code in a c++ class library file? I made this to include through a reference in a c# app file. This is what Ive tried but Ive gotten all sorts of build errors: [CODE]// CClass.h #pragma …

Member Avatar for Banfa
0
263
Member Avatar for w0rk4holic

how do i find all the interior angles of a concave polygon? here is a java applet that does the same :- [URL="http://www.mathopenref.com/polygoninteriorangles.html"]http://www.mathopenref.com/polygoninteriorangles.html[/URL] thanks

Member Avatar for w0rk4holic
0
433
Member Avatar for blackmagic01021

Hello, I have received a piece of code which compress the image direct from a camera to a encoded file using Rice algorithm. [CODE]void code_riceI(unsigned short int *pic, const int X, const int Y, const int n, char *fn) - *pic: pointer to a field of 16bit image (bayer encoded …

0
66
Member Avatar for priyankapandey

Hi all... can anyone explain how i can read from a config file and retrieve its value in a cpp file... I am writing down the cfg file... <APM> [APM_SAYHELLO] Formatter.Type = String Formatter.Val = AtlLogPlainTextFormatter Filter.Type = String Filter.Val = LEVEL_DDEBUG ComponentLevelFilter.Type = String ComponentLevelFilter.Val = true ComponentsEnabled.Type = …

Member Avatar for phoenix911
0
166
Member Avatar for Luks

Hallo! I am a running a program, using the OmniORB and I have included the include path in VC++ directory, but I get the following error: 1>c1xx : fatal error C1083: Cannot open source file: 'C:\Program Files\omniORB\4.1.4\\include': Permission denied I am the administrator on my PC and I have all …

Member Avatar for Luks
0
835
Member Avatar for aianne

Hi! I need help to my Turbo C program.. I need to create a program that will ask the "Starting X:", "Starting Y:", Ending X:", and Ending Y:" on different shapes.. this is how the program should be: [CODE]SQUARE: starting X: starting Y: ending X: ending Y: CIRCLE: Starting X: …

Member Avatar for Top9ne
0
1K

The End.