49,761 Topics

Member Avatar for
Member Avatar for PDB1982

I'm trying to create an overload of the "+" within my program to add a private constant value to an already establish polynomial, but the last portion of my code comes out with the following error: [code] Error 1 error C2677: binary '+=' : no global operator found which takes …

Member Avatar for david.k
0
176
Member Avatar for ccaatty

This is just out of curiosity! Does anyone know what is the maximum number of characters that a line of code can have? EDIT: Added more details. Is it possibly possible to make two lines become one? .... This seems pretty odd, I dont know how to explain it, but …

Member Avatar for cassandy
0
101
Member Avatar for som3aman

Hey guys, Im trying to make a program that guesses the name of an animal in the users head by asking him or her a bunch of questions. The questions, answers, and line number for yes/no are inlcuded in the file animals.txt as follows: Q Does it have feathers? 2 …

Member Avatar for Lerner
0
2K
Member Avatar for cpp.coder

[CODE]# include <stdio.h> int abc(int & x) { return x; } int main() { int y = 0; abc (y++); // error here return 0; }[/CODE] error is error C2664: 'abc' : cannot convert parameter 1 from 'int' to 'int &' But if i call the same function as abc …

Member Avatar for cpp.coder
0
196
Member Avatar for gopi17

okay i need some help with this...i'm creating a graph program..the problem is the linked has to be user specified...i manage to create a linked list..i don't know how to create another one...its some sort like this : 0 1 2 0 - - > created this 1 - - …

0
63
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
171
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
276
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
256
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
580
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
279
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
119
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
162
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

The End.