49,761 Topics

Member Avatar for
Member Avatar for angelinrajeesha
Member Avatar for StefanTUE

Hey all, I just started programming C++, (only formiliar with matlab/mathematica for image processing) . I like to find the min of my grayscale image. My image is a part of frame token from a webcam. But I don't even know what type of object my image is. Is it …

Member Avatar for StefanTUE
1
217
Member Avatar for solycutema

Hi all, Currently im doing a little coding to communicate between two PCs through RS232 ports. i am thinking of using: "writeFile" to send a string to the other PC, "readFile" to read back the acknowledgement string from that PC and "strcmp" to check if the read back acknowledgement string …

Member Avatar for solycutema
0
148
Member Avatar for bleedi

Hi, I'm studying C++ at the university and came across a problem in my exercises. Basically I'm trying to retrieve an integer from an object via its getter method. The object is stored in a vector. Here's the main.cpp part: [CODE] vector<Client> vektori; ... vektori.push_back(Client(account, firstName, lastName, balance)); ... vector<Client>::const_iterator …

Member Avatar for bleedi
1
179
Member Avatar for merse

C++ has a standard function isinf()? like isnan()? If yes, it returns true in case of +inf and -inf also?

Member Avatar for merse
0
180
Member Avatar for arsenal_fan

I am watching lectures on C++ from the stanford online courses website. I have a slight problem in understanding how memory is allocated for a string in C++. Basically when you declare a vector the constructor is called and memory is allocated for the array arr, numUsed and numAllocated are …

Member Avatar for arsenal_fan
0
166
Member Avatar for +_+man

hi everyone how to generate random codes given to the computer if i give three codes example : 123,234,567 i need to output anyone of these at a time

Member Avatar for daviddoria
0
97
Member Avatar for ThrasherK

I have a problem with code I am writing. I am supposed to count the instances of each specific digit that the user inputs. I am supposed to output blank digit appears blank time(s). I figured out how to get the numbers to go to different indexes in the array …

Member Avatar for ThrasherK
0
209
Member Avatar for Isabelle

Hello guys, This project requires the use of an array of pointers to aRandomNumberGenerator (i'll call it Random for short) objects. Both aDie and aCoin are derived classes of the Random class. I am to use the array to call the virtual function generate. My problem arises in my main …

Member Avatar for Isabelle
0
124
Member Avatar for LevyDee

((serverDlg*)m_pDlg)->OnReceive(port); I built a server using MFC, and had to get the foundation going by using examples online. The OnReceieve(port), is a function that I created in my CDialog class. ((serverDlg*)m_pDlg) is the part I don't get. This line of code is in a function in my socket class, and …

Member Avatar for LevyDee
0
207
Member Avatar for kooia

Hi everyone, I was wondering if there's a way to write a command to the terminal from a c++ program. I'd like to be able to have some kind of loop with a Makefile, so the last command on a makefile runs the makefile again. Otherwise, is there a way …

Member Avatar for kooia
0
167
Member Avatar for c++learner

Hello, I'm simply trying to keep track of how many times a space is encounteed in a string and then print the number of times to the console. Can someone please examine and give me a tip on what is wrong? Thank you! [CODE] #include <iostream> using namespace std; int …

Member Avatar for c++learner
0
180
Member Avatar for amit12

one thread try to read from vector and another thread try to delete from vector how to do it

Member Avatar for Agni
0
330
Member Avatar for kooia

Hi everyone, I want to copy the output of a program with another program so I can write it to a file. I'm running Ubuntu Linux, and I'm trying to see what my system is like with hwinfo. The list is too long, though, so I need to put it …

Member Avatar for kooia
0
120
Member Avatar for dansnyderECE

I'm trying to compile an executable (ELF file) that does not use a dynamic loader. I built a cross compiler that compiles mips from linux to be used on a simulator I made. I asserted the flag -static-libgcc on compilation of my hello.cpp file (hello world program). Apparently this is …

Member Avatar for vijayan121
0
2K
Member Avatar for xDer

Hey! I am using UDP sockets in IPV6 and i can't get the server to receive the packet sent by the client to the All Hosts ipv6 address ff02::1. The client is sending the packets as i see them in the wireshark. Can you help please? [CODE] Server #include <sstream> …

0
57
Member Avatar for sabareesh

// function declaration char* operator LPCTSTR(); // defenition char* String::operator LPCTSTR() { char* szArry = NULL; szArry[1024]; reurn(szArry); } how we can create a LPCTSTR string class member function in c++

Member Avatar for Ancient Dragon
0
236
Member Avatar for sfuo

So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef …

Member Avatar for sfuo
0
270
Member Avatar for nasnoma

My program basically asks the users for a value (s) then calculates and displays the First, Middle, Last, and Final. The users have a choice to enter the value either in integer, real or character. If the user enters it in real or character, it will be converted into integer …

Member Avatar for nasnoma
0
515
Member Avatar for adaniel058

I have tried to create a simple class where the program passes a name and telephone number to my class type and then prints it to the screen. It tells me I have undeclared identifiers, but I am constructing my program just like an example we did in class. Can …

Member Avatar for adaniel058
0
114
Member Avatar for mrnutty

Say you have a class Foo, and it contains some member variables. And in that class you have a const-correct function. Can you code some way in C++, that changes the private member variable, inside the const-correct function. For example : [code] class Foo{ int num; public: void doIt()const{ num …

Member Avatar for Fbody
0
94
Member Avatar for Anocondo

Can anyone help me create functions for doing this 1) three bool methods onCircle (Point *), outofCircle (Point *), and inCircle (Point *) for a Circle object C (so C->onCircle (P) for a point P means the point P lies on the circle C (i.e. the distance of P to …

Member Avatar for mike_2000_17
0
261
Member Avatar for XxPKMNxX

Ok, i have my code: [CODE] int seconds; clock_t clock(); seconds = clock()/CLOCKS_PER_SEC; if (seconds == 8){ FIVE.SetPositionX(-1); } //.... if ((AdventureGame.keypressed[DIK_F]) && (WOO.positionX == -10)){ //reset clock() here FIVE.SetPositionX(-5);} [/CODE] the clock starts when the program is run and after 8 secs, FIVE moves position. When i press F, …

Member Avatar for XxPKMNxX
0
195
Member Avatar for ota1it1iuss

Iam new to programing, so be gentle!!!! I have to program the Fibonacci Sequence up tothe first 29 numbers. The output starts at 1 2 3 5, not 0 1 1 2. What am I doing wrong to not get the 0 1 output. Here is the code: [code=c++\] #include …

Member Avatar for shabnamapi
0
421
Member Avatar for AamirH

Hi, I am writing a C++ program to "find and replace" strings. Following is the code: [CODE=c] void pt::replace() { string str( textpath ); string searchString( "\" ); string replaceString( "\\" ); assert( searchString != replaceString ); string::size_type pos = 0; while ( (pos = str.find(searchString, pos)) != string::npos ) …

Member Avatar for mike_2000_17
0
106
Member Avatar for hking

This is my assigment and i have no idea to do that. Somebody please help ! Write a program that reads from a file the number of candidates in a local election, then their last names and the number of votes received by each. Use dynamic memory allocation to store …

Member Avatar for mike_2000_17
0
245
Member Avatar for ichigo_cool

Well I've been learning C++ on and off but I plan to stick with it and I'm going to try to program at least two hours a day everyday for the rest of summer and hopefully when school starts again if I can. How often do you guys program? (just …

Member Avatar for mike_2000_17
0
612
Member Avatar for mdeveau

Here is the code that I have been given for an assignment. The modification that I need to make is to allow the program to read 10 sample points and determine which are contained in the plume boundary. I have included the modification that I think is appropriate for the …

Member Avatar for mdeveau
0
97
Member Avatar for askreiyna

i want to know the advantages and disadvantages of single and multiple line comment in programming language in term of reliability, readability and writability. please help

Member Avatar for askreiyna
0
76
Member Avatar for eftela

ei, anyone, i need help for my project, we need to create an info. system in c++ with the following functions: [LIST=1] [*]search records [*]add records [*]delete records [/LIST] i decided to use fstream for this code and i was able to view all records and add records at the …

0
55

The End.