49,757 Topics

Member Avatar for
Member Avatar for sravs25

hi friends, i am doing visual c++ course , i got a image which captured from webcam, that image to be stored in 2d array can any one help me how to store that RGB image in to an array please.

Member Avatar for sravs25
0
1K
Member Avatar for jumomma

Hi all, I am very much a beginner and I'm struggling just to pass this class..so go easy on me. I keep getting this 1 error and I cannot figure out why. I'm sure it's something simple but I'm at a dead-end here. This is the error I get, it …

Member Avatar for jumomma
0
311
Member Avatar for bigt666

I'm trying to do a program that gets the averages of positive and negative numbers in an array that consists of numbers I have to read from a file.txt. I'm having trouble in how to put the numbers in the file.txt into the array and I can't seem to understand …

Member Avatar for VernonDozier
0
106
Member Avatar for abhimanipal

Hello people I have a small doubt in operator overloading I am trying to overload the assignment operator. Here is my code for that [CODE] class rational { int x; int y; public: //All the constructos rational operator= (rational num) { // Why do we need to return a reference …

Member Avatar for Ancient Dragon
0
156
Member Avatar for fregley

Hi everyone! This is my first post. I'm relatively new at c++, but not completely ignorant, so please bear with me. Anyway, I'm trying to create a game in a console application. However, I don't really know how to have multiple things happening at once. At this point, I want …

Member Avatar for fregley
0
147
Member Avatar for c++2ndLanguage

Hi everyone, I am working on a project that requires me to write a program which given a single word will search a database of thousands of songs and will return the artist, title, and the context in which the word appears in the song. Each song has a SongId …

0
40
Member Avatar for Lukezzz

Hi, I have a question about when you have compliled a Form application as a release where the product exists of: - exe.file - Program Debug Database - Incremental Linker File What I now wonder is that I have in my project some important usernames and passwords. My question is …

Member Avatar for VernonDozier
0
99
Member Avatar for ollie60

I am using a linked list for the first time and am trying to add an entry to the list. However I am getting an error in this section of code: [CODE]if (is_tri == true) { //add the triangle to the list ListElement *p = new triangle((*nodeVec[i]), (*nodeVec[j]), (*nodeVec[k])); triList.AddElement(p); …

Member Avatar for tkud
0
79
Member Avatar for Instinctlol

How would I do something like this? I know that this will not work, I'm just using it to show what I need with help. When a user is suppose to enter a number, but instead enters a string or char, it gives him a cout message saying it doesn't …

Member Avatar for VernonDozier
0
78
Member Avatar for bsse007

will any body plz tell me about random access file.i need to know about write random data on random access file. this data can be of any txt file?kindle mention some initial coding.reply sooooon plzzzzzzz

Member Avatar for The ICE Man
-1
97
Member Avatar for Teethous

Hey guys I am having a problem writing to my text file. I notice when the data is written some of it comes out as gibberish. Take a look and let me know what I am doing wrong. Thank you. [CODE] #include <iostream> #include <string> #include <fstream> using std::cin; using …

Member Avatar for Fbody
0
163
Member Avatar for Dinglish

i am writing a program whereby i have written the instructions the shell of the program, and have written code for inputting values, but how do i collect all the information i have inputted. I am aware it involves arrays but can you help and point me in the right …

Member Avatar for caut_baia
0
102
Member Avatar for beginnerprogram

A square plate divided in 100 squares or nodes by a grid. the temperature of the nodes form a two-dimensional array T[i][j] .the temperature in all nodes at the edge of the plate is constrained to be 20*C by a cooling system, and the temperature and the temperature of the …

Member Avatar for nezachem
0
239
Member Avatar for Annettest

Hi everyone: I'm having problems constructing a loop and I'd appreciate any advice. This is probably a simple problem, but I just can't make it work! This isn't homework! I'm an old fart and I'm new to C++. Here's what I want to do: take a vector and insert it …

Member Avatar for Annettest
0
185
Member Avatar for nerak19

[code]#include "stdio.h" #define ROW 4 #define COL 4 void input_matrix (int, int, int A[][4], int B[][4]); void add_matrix (int, int, int A[][4], int B[][4], int C[][4]); void loadidentity_matrix (int, int, int D[][4]); void main (void) { int A[ROW][COL]; int B[ROW][COL]; int C[ROW][COL]; int D[ROW][COL]; int i, j; input_matrix (ROW, COL, …

Member Avatar for nezachem
0
133
Member Avatar for restrictment

Hello everyone, I am trying to make a simple web browser for my own benefit (not a school project). I have been looking through multiple videos on how to do so, and could only find 'simple' web browsers on almost every video for visual c++. Anyway, the videos work, but …

Member Avatar for jonsca
0
208
Member Avatar for manish.ranjan
Member Avatar for jwenting
-2
77
Member Avatar for Ianonfire

Stupid request i know :S but i wrote this program so long ago and my C++ knowledge is so bad i need help remembering how it works :( ive completely forgot how linked lists work ive been working with javascript + java and amoung all my uni assignments my brain …

Member Avatar for Fbody
0
115
Member Avatar for samurai1200

I have a 2D array whose cells represent each character in a terminal window that can either be ON or OFF (boolean). [CODE] bool grid[24][80];[/CODE] Then, using the ncurses API, I grab a key press: [CODE]key = getch();[/CODE] where key is an int type. The 'q' key is what I …

Member Avatar for samurai1200
0
681
Member Avatar for miturian

So, I'm still working on my matrix class (in case anyone reading this also read my thread from the other day). I really like the array-feature that I can initialize an array with a list of numbers, such as [CODE]double array[2]={1,2};[/CODE] and would like to implement that in my matrix …

Member Avatar for miturian
0
81
Member Avatar for NinjaLink

My program is created to output permutations. Depending on the input that I put in, I sometimes get the correct result, but it is not accurate. However, when I do "abc", I get the correct result. When I input peoples names, I get a random result. After trying to figure …

Member Avatar for Sodabread
0
130
Member Avatar for mmpjb

Hi all, Currently trying to write a piece of code for a project at university, with very little C Compiler experience I am struggling... Basically- we have 8 LED's, and 8 switches. We want 4 of the 8 LED's to light up at random when the program is run, that …

Member Avatar for jwenting
0
298
Member Avatar for Phasa

It compiles and runs, but after "Here is the starting empty cubes vector" prints, I get this message: [B] Debug Assertion Failed![/B] [B] Expression: vector subscript out of range[/B] Can someone help me, please? [code=CPP] #include "stdafx.h" #include <iostream> #include <vector> using namespace std; // Cubed integers class cubes { …

Member Avatar for caut_baia
0
137
Member Avatar for shrutinr

Hi.... I m doing my project in vc++ exp edition.. My problem is, i store my value in a textBox1.. Now i want to pass that value to the CAN variable type NCTYPE_UINT8 .. NCTYPE_STRING arr[100]; arr[0]=this->textBox1->Text; while compilation the error is raising like: "error C2440: '=' : cannot convert …

0
61
Member Avatar for jelinky

hey, i am new here but i have taken a few c++ classes. im having trouble with a very easy program and i just cant figure out why its doing this. ive looked around the forum already and didnt find anything helpful so i thought id ask. [CODE] include <iostream> …

Member Avatar for bugista
0
138
Member Avatar for Duki

Hey guys, I'm trying to run this code [code=c++] // Copyright (C) 2001-2003 // William E. Kempf // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/thread/thread.hpp> #include <iostream> void helloworld() { std::cout << "Hello World!" << std::endl; } …

Member Avatar for Duki
0
144
Member Avatar for Jsplinter

I am trying to write an if statement to test whether two conditions are both true. However, my code does not work when I combine the both tests into one if statement like: [CODE] if((last_smallest < samples[i]) && (samples[i] < current_smallest)) current_smallest = samples[i]; [/CODE] I know it is possible …

Member Avatar for Jsplinter
0
111
Member Avatar for arsshaw

> Specification: Display a menu > Find Errors in this program #include "stdafx.h" #include <iostream> //change io to iostream #include <string> using namespace std; // added I get the `Error 1 error C2065: 'choice' : undeclared identifier line 17 which is 'choice'` What am i missing? int main ()// added …

Member Avatar for arsshaw
0
405
Member Avatar for casjackkwok2001

Hello! I am working on my project..my code looks fine but I always get a wrong output. For example: I enter 11 for hour, 05 for minutes. The output should be display 11:05...but anyway it shows me 11:5 The zero is gone?? Is there anything i'm missing?? Please let me …

Member Avatar for Ancient Dragon
0
78
Member Avatar for bgx90

Can anyone tell me why my recursive find function for a binary search tree isn't working? It keeps returning false when searching for items that are in the tree. Thanks. [CODE=cpp] template<class T> bool BST<T>::find(const T& sitem) const{ //Precondition: // A binary search tree exists // //Postcondition: // If item …

Member Avatar for bgx90
0
95

The End.