49,761 Topics
| |
Hi I am trying to write a function in a program that reads a 2d array withs 2 rows & determines the largest number & whehter that number is in row 0 or row 1. For example: [QUOTE]Enter distinct integers for a 2d array with 2 rows and 5 columns. … | |
I need to use a webcam for a project where I need to control cam's internal parameters. I know that I can find in the market cameras with some API's, like logitech. For the other side I know I can do something with DShow and Windows Driver Development kit. Someone … | |
I'm trying to teach myself C++ through internet tutorials and such. Right now I'm trying to write a program that find the diameter and radius of a circle if the circumference is entered, and does the same if one of the other two measurements is entered instead. I'm using switch/case … | |
[CODE]You are to design a class class called Employer data members: char name[] long int ID double salary , and two constructors _Default construtor Person () _Copy constructor Person ( char n[30],long int id,double s) _setPerson (char n[30],long int id,double s) that allows user to set information for each person … | |
Hello! I'm new in C++, and I have a basic question: When I have a function: [CODE] void foo(str* s){ char* p; p = new char[strlen(s)]; strcpy(p, s); cout << s <<endl; } [/CODE] This function will take the length of s and in bytes and will allocate that much … | |
[CODE]#include <iostream> #include <stdlib.h> using namespace std; void GetTime ( int*, int*, int* ); int CalcSeconds ( int, int, int ); int main() { int hr, min, sec; char another; int total_sec; cout << " \n\n Welcome to a time-conversion program ! \n\n " ; do { GetTime( &hr,&min, &sec); … | |
I am working on this project for a class. I have input the students last name, first name, student ID and three test scores. I have to make the first step a function that stores the data into an array. Inside this array it is also going to give the … | |
Hi people Could someone tell me what is the difference between runtime and compiletime polymorphism? thanks alot | |
i wanted to ask you guys for some help i use microsoft visual studio 9.0 and i have downloaded hotspotter but it resulted it was all a source now i dont know how to compile it with mocrosoft visual studio any help??????????? | |
Hi, I am trying to declare a 3D array with the size of 6,400 and 400 in each dimension using the code as following: [CODE] short matrix[6][400][400]; [/CODE] but actually it introduced a run time error "stack overflow" after surviving the compilation.So what's wrong with this code and how to … | |
For my Electrical Engineering summer research project we're using a single mysql server and multiple iPhones. The iPhones are going to collect data and send it to the server which will populate the database with the data. I am new to socket/network programming so I need some pointers to my … | |
Hey guys, I need a favor. My text file looks something like - type1 10 5 6 0 3 type2 9 4 0 0 5 type1 10 4 0 0 7 type2 9 0 5 8 6 type3 7 3 7 0 9 type3 7 0 9 9 9 I … | |
how i can convert string to int in c++ gui mode | |
hi ,when im trying to insert key-value pair in map(key-char array field of a structure,value-entire structure)im having errors . NDBAPI/TGBitsNdbApi.cpp: In function `int get_map(Ndb*, char*, char*, void*, void*)': NDBAPI/TGBitsNdbApi.cpp:154: error: request for member `Msisdn' in `structPtr', which is of non-class type `void*' NDBAPI/TGBitsNdbApi.cpp:156: error: `void*' is not a pointer-to-object type … | |
Maybe it's a really basic question..... ..but why does this NOT work? Respectively what options do I have to get this working? g++ reports: expected constructor, destructor, or type conversion before ... (I marked the line below in which the error occured.) Your help is very appreciated! Thanks! [code=c++] #ifndef … | |
[B]THE QUESTION[/B] with a positive integer s read from the keyboard, find all sequences of two or more consecutive integers whose sum is = to s.... for example.... if user enters 15 result should show 1 2 3 4 5.... 4 5 6... 7 8.... [B]MY TRY[/B] [ICODE]#include <iostream> #include … | |
I have some real time data that i want to show in an edit box but at the moment it only displays the first value when the program starts. What i would like to know is how to go about updating what is displayed in the edit box every so … | |
Hi Everyone. I'm pretty new to C++ and C, but I have experience with other languages (not OOP). I'm working on a project that requires me to take a working source code in C++ and convert it run in C. Luckily the inheritance diagram isn't too bad, so theoretically, I … | |
Hi, I have PCRE library for window 32 bit . I want it for window64 bit From where can i get this? I have source code also and i built it on 64 bit machine but created library is not supporting. | |
Hi everyone, I'm trying to link a class with a library. The script is: /bin/sh ${BOREALIS}/common/bin/libtool --mode=link --tag=CXX ${BOREALIS}/nmstl/bin/wtf g++ -g -Wall -o $1$app $1.o -L/home/vincenzo/software/borealis-projects/LoadDistributionTool -lwld I get the error: Linker errors follow. This mode is untested; type "wtf 0" for the original output. cannot find -lwld in /usr/bin/ld … | |
After adding information, when i choose the option "Display all" it crashes right before it's going to display GPA... can anyone help me...also can anyone help me read from the file into the array... plzz...this is really frustrating...any help greatly appreciated. [code=cplusplus]# include <stdio.h> # include <string.h> # include <iostream> … | |
Can someone please explain what \n\n means in a line of text in C++? For example ("\n\nWelcome to Main Menu\n\n"); Thanks | |
Hi, that's my first bigger work in C++. Programm works good but I don't know where I have to alocate memory. And for which structures or something else I have to do alocation? Can anybody help me? Thx. There is my code: [CODE=c++] #include <stdlib.h> #include <ctype.h> #include <stdio.h> #include … | |
I am doing a program on payroll before any deductions are made but i seem to be encountering some problems. Here is the program [code=cplusplus] # include <stdio.h> # include <string.h> # include <stdlib.h> # include <fstream> # include <iostream> # include <cstring> using namespace std; typedef struct { char … | |
I'm writing a spellchecking program using a hash table. The hash table (a char * array) serves as the dictionary, storing words inputted from a file. However, a segmentation fault occurs before I can get through reading, hashing, and inserting all 60,389 words (the words are in alphabetical order, and … | |
[code]class theGame { private: void question1();//You awake void question2();//Go find a sword void question3();//Go find armor void question4();//Find dragon void question5();//Kill dragon char answer1; char answer2; char answer3; char answer4; char answer5; public: void showQuestion(); void enterAnswer(); }; void theGame::showQuestion() { void question1(); void questoin2(); void question3(); void question4(); void … | |
my C++ program is writing an array to the file...but how can i get the data to read into the array in my program? | |
Is there a way to convert from const char * to char * without casting away the const? I was warned that it could be dangerous and cause crashes (which I would agree with, since when I ran my program with const_cast, it caused a segmentation fault). Alternatively, is there … | |
hi can anyone tell me how to generate random number within certain limit as in between 10 to 20 etc .please help me Thanks anuj | |
hi,i am trying to make a global integer array of size 32 in Windows forms.I am Using Visual Studio C++ 2008. here is my code: [code=c++] array<Int32^> ^garray = gcnew array<Int32^>(32); [/code] if i declare it globally then it gives the following error: "error C3145: 'garray' : global or static … |
The End.