49,757 Topics

Member Avatar for
Member Avatar for pieftw

Hello, I am having a problem with my program that finds the prime factorization of a number. I seem to be getting the correct prime factors, but my problem is with repeating factors. For example, if I input 3,428, the correct prime factorization is 2 x 2 x 857, but …

Member Avatar for Banfa
0
165
Member Avatar for CppBuilder2006

this program contains a template function that can calculate determinant of any n by n matrix using permutations. it can be run in Visual C++ 2010 Express.

Member Avatar for aruldave
2
452
Member Avatar for coroche

Hi, I'm trying to write a programme that will take user input strings containing name, surname and city of residence separated by spaces and extract each one and print them out individually. Here's what I have so far. [CODE]#include <iostream> #include <stdio.h> #include <cstring> using namespace std; int main() { …

Member Avatar for AdamLad3
0
102
Member Avatar for nine9hours

Qt ide gives error about"error: passing 'const QChar' as 'this' argument of 'QChar& QChar::operator=(const QChar&)' discards qualifiers" here for(int i=reqposition;;i++) { if(data.at(i)==',') break; temp.at(j)=data.at(i); // ERROR IS HERE j++; } what do i do to solve it!

Member Avatar for nine9hours
0
209
Member Avatar for ShEeRMiLiTaNt

Hello, I need help with something. I need to write a program that goes into a text file and searches the characters one by one until it finds a group of them that I need, to store into another character array. The group of characters is "7 people who...will fail! …

0
95
Member Avatar for tom12

Guys i really need some help here with this function, in my program i enter string to to encrypt. from my function i want to delete all spaces, i'm really having problems here hope someone can tell me were im going wrong. thanks again. [CODE]#include <iostream> #include <string.h> #include <ctype.h> …

Member Avatar for tom12
0
182
Member Avatar for DaniRulz

[B]Question 1 (10 marks)[/B] Design a program that asks for 4 test scores. The program should calculate the average test score and display it. You need to develop an 1.1) IPO chart (3 marks) 1.2) Pseudo-code (5 marks) 1.3) 2 Sets of test data (2 marks) [B]Question 2 (20 marks)[/B] …

Member Avatar for DaniRulz
0
258
Member Avatar for contacttonipun

I am not able to solve problem number 25 mentioned in the attachment. The problem is related to questions 23 and 24, which I have solved. Their code is given below. Can anyone help me with problem 25? Just so you know, since I am a beginner, I am only …

0
74
Member Avatar for eve_moore

I have an image processing project using c++ language. I have also linked opencv to integrate some optimized algorithms.However, I would like to create a nice GUI using Visual C#. Is it possible to call a certain program in c++ in visual c#. (P.S. I have no idea about dll, …

Member Avatar for eve_moore
0
298
Member Avatar for FraidaL

I wrote this code for a homework problem. The instructions say that there is a list of phone numbers that were reversed (ex. 6463124137, needs to be 7314213646) and the program needs to reverse them back. My professor also included this hint: [I]"Hint: One way to reverse the number would …

Member Avatar for FraidaL
0
179
Member Avatar for BCBTP

Hello, people on daniweb. I was programming in C++CX for a metro application I am making, and needed to do a little string manipulation. Does anyone know if there is a way to individually edit members of String^, like an array, or if there is some equivalent to stringstream on …

Member Avatar for thines01
0
283
Member Avatar for chinkums

I am trying to read a file and display data. The data is bank transactions. I need to display the data from the file with a balance column added at the end keeping an accumulated balance of the deposits/transactions. I am having difficulties with the accumulator. Additionally it will need …

0
52
Member Avatar for lw2025

I'm trying to write a simple calculator that uses functions, but I'm really struggling to understand. Technically I'm supposed to have defined functions to enter both operands, but I'm confused about passing the data once it's been entered. I also need a function that decides if the second operand is …

Member Avatar for lw2025
0
144
Member Avatar for Sohvkhan
Member Avatar for BaconWeave

I'm having fits with an assignment. Basically, the program is supposed to read in command line arguments and input from a text file and, through a long and convoluted chain of dynamic structures, sort them according to the command line input. The input text file reads as such: [I]3 "Smith, …

Member Avatar for WaltP
0
213
Member Avatar for Sohvkhan

Why doesn't my program accept "quit" when I input it? #include<iostream> #include<fstream> #include<string> #include <cassert> using namespace std; int main() { ifstream file; char filename[20]; char infile[20]; int count=-1; for(;;) { cout<<"Enter the file name that you want to open or write 'quit' to exit: "; cin>>filename; if(filename == "quit") …

Member Avatar for Sohvkhan
0
140
Member Avatar for Danielhuo

Hi, experts: I am very to c++, and here is a program that should: • create a Customer object– (although you will only be using one constructor here, be sure and test all three) • Display the Customer’s info using the ‘get’ functions • Ask the user how many months …

Member Avatar for Danielhuo
0
201
Member Avatar for dextor33

#include "stdafx.h" #include "windows.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HKEY hKey; char sd[255]; char path[MAX_PATH]; int Freq = 0; int Duration = 100; bool Forwards = true; bool Backwards = false; int timer = 0; HWND hWin; HMODULE GetModH = GetModuleHandle(0); GetModuleFileName(GetModH, path, 256); …

Member Avatar for BCBTP
0
355
Member Avatar for ads1188

Hi All, I am new to programming and have been trying to learn the c++ language for the last couple of weeks. I feel that I understand a lot of what I have learnt but where I am confused how databases are used if c++. Most the tutorials or books …

Member Avatar for Ancient Dragon
0
153
Member Avatar for SpiderMan120988

Hi, I need help writing a program that allows you to read an English-French dictionary into two arrays. The English words are stored in one file alphabetically while the French words are stored in the other file corresponding to the English words. This means that the program would ask the …

Member Avatar for Ancient Dragon
0
957
Member Avatar for imc++

Hey guys. I ma new to c++ and need a little help. My teacher gave us an assignment in which we have to take input from the user as to how many integers are to be entered. the program then compares the first integer with the rest, then it compares …

Member Avatar for mike_2000_17
0
138
Member Avatar for hifistyle

We're just getting started on DarkGDK and I thought I was doing okay. The assignment is to "go through" every pixel in an image and "swap" the blue and red one. My program gets hung up after the first dbWait(), and I'm not sure if any thing is happening so …

0
122
Member Avatar for waldo2000

i am receiving this error for this section of my code: int R[] = {3, 4, 1, 2, 0, 5}; int L= dist (R(0),R(1)) + (R(1),R(2)) + (R(2),R(3)) + (R(3),R(4)) + (R(4),R(5)); im not sure how to solve this error.

Member Avatar for WaltP
0
41
Member Avatar for phorce

Hello, I have a major problem with a Correlation algorithm I'm trying to implement.. Basically, when I have two small matices: Matrix 1: 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 …

Member Avatar for phorce
0
92
Member Avatar for dlmagers

Ok, when I run my program it is asking me twice what I only need to be asked once. [code]#include <iostream> #include <iomanip> using namespace std; int main () { //Variables double calories = 0.0; double weight = 0.0; char gender = ' '; char level = ' '; //enter …

Member Avatar for WaltP
0
121
Member Avatar for brickbuilder

Hi ! I'm trying to learn about sockets using winsock in c++. What I want to do is have one computer (my computer) act as a mini server for my friend to connect to directly from his house (different ISP). I am wondering if it is possible using sockets to …

0
140
Member Avatar for Lama1

Hello .. Afternoon, happy, I have a test tomorrow and I want your help in the creation of code: we would like to counter and find the maximum , Minumum for linked list ? PLZ help me :)

Member Avatar for sfuo
0
31
Member Avatar for fishsticks1907

I get an infinite loop if i enter a char/string during the switch statement, so i made an exception to catch anything other then integers. But, i still get the infinite loop. I may be doing something wrong so any help would be great. [CODE] #include <iostream> #include <string> #include …

Member Avatar for fishsticks1907
0
264
Member Avatar for jeevsmyd

[code]for(int i=0;i<=c;i++) { l=0; if(strcmp(findedge(tst[i],dfa[0][j]),"null")!=0) { strcpy(t1,findedge(tst[i],dfa[0][j])); //l=strlen(temp); strcat(temp,","); strcat(temp,t1); //temp[l+1]='\0'; //temp[l]=','; } } [/code] When I try to append comma or some other symbol to temp, a segmentation fault occurs. If that step is omitted everything works perfectly. This is code is from my program to convert NFA to …

Member Avatar for Ancient Dragon
0
239
Member Avatar for Philip435

Hi, why does the two functions factorial and factorial2 only return the right factorial if the input is 12 or less ? [CODE=c] #include "iostream" using namespace std; int factorial(int n){ if (n==0){ return 1; } else{ return n*factorial(n-1); } } int factorial2 ( int x ) { int p …

Member Avatar for VernonDozier
0
83

The End.