51,593 Topics

Member Avatar for
Member Avatar for Iruka_86

Hello, Can any of u help me with this assignment.. I tried to do it myself but cuz I'm new in Object Oriented my program was full of errors that I don't know how to fix :( Please help me as soon as possible.. here is the question: Write class …

Member Avatar for StuXYZ
0
180
Member Avatar for GURU1349

hello people, its the very first time im doing programming stuff.And i have done nothing so far.I found a booklet in my bookcase,it's about C++.,ts just the first booklet of a serie. i use visual c++ 2008 express,i did new>file>C++ i used the same codes as in the booklet,here it …

Member Avatar for Freaky_Chris
0
105
Member Avatar for Anbuvengeance
Member Avatar for Anbuvengeance
0
79
Member Avatar for college.student

I'm running a simlpe hello world program in visual c++ but in the console mode but i keep getting all these errors unbale to start program c:\users\johnathan\warfield\documents\Visualstdio2008\projects\program1helloworl\Debug\program1 helloworld.exe the system cannot find the specified file. how can i find this error???

Member Avatar for Comatose
0
113
Member Avatar for kaviths

[code] #include<iostream.h> using namespace std; class first { int reverse() { char name[]={'k','a','v','i','t','h','a','/0'}; int 1=0; while(name[i] != '/0') { i++; cout<<"value of i is"<<i<<endl; } } int main() { first f; f.reverse(); } }; [/code] my file's name is cpp.cpp and i cannot run it using ./a.out I get a …

Member Avatar for Freaky_Chris
0
91
Member Avatar for shaftoe3

Hi, when i run my program the following error occurs: "Unhandled exception at 0x00415b72 in testMatrix_size.exe: 0xC0000005: Access violation writing location 0xfdfdfdfd." and seems to happen over the line converting a string to double: n = Comma - Position; Numbers=line.substr(Position,n); Data[i][j] = atof(Numbers.c_str()); //problem is here. The program does the …

Member Avatar for Salem
0
126
Member Avatar for TasostGreat

I'm trying to write a program which reads a file really small size with two number and a character and ouput another file which can have up to 120.000.000 characters. is unistd equal to direct system call function? and if yes is it the fastest way to read/write data on …

Member Avatar for TasostGreat
0
211
Member Avatar for mcamacho07

Here is an ex of a problem I'm having difficutly with. I need to make up a program that does the following: asks user for the number of seconds and the number of miles traveled program should convert the given number of seonds into different units of time in years/days/hours/minutes/seconds …

Member Avatar for Salem
0
574
Member Avatar for bobomicgruvins

I am currently trying to write a program to compute permutations of the array [0,1,2,3,4,5], I need to save all the permutations to another array and I also need the first digit, 0, to be fixed. I have searched through quite a bit of literature on doing this, however I …

Member Avatar for Salem
0
228
Member Avatar for phoniel

Hey - I'm new asking questions here. I'm writing a simple program to give a number to a power using a recursive function (inconvenient, but that's the assignment). It seems as though the program should work, and debugging shows that it almost does. It has the right value up until …

Member Avatar for devnar
0
139
Member Avatar for integer*09

Hi all, Currently, i'm having a window to show rows of data. the following is for 1st row: [ICODE]a0_1->Text = "blah,blah"; b0_1->Text = "blah,blah"; c0_1->Text = "blah,blah"; d0_1->Text = "blah,blah"; e0_1->Text = "blah,blah"; ...............[/ICODE] And as for the 2nd row, its just a change for the last integer of the …

Member Avatar for integer*09
0
89
Member Avatar for tomtetlaw

how do i make a macro saying that the platform is windows? like this: [code=c++] #ifdef WINDOWS //this is the one i am talkin about #include "windowsHeader.h" #else #include "linuxHeader.h" #endif [/code]

Member Avatar for Narue
0
47
Member Avatar for Clockowl

Hey guys, I was wondering... I always assumed that references were more or less constant "dereferenced" pointers. With that in my mind I tried to do this: [code=cpp] #include <iostream> #include <string> using namespace std; void outputIt(const string * const textz00rs){ cout << *textz00rs << endl; } int main(){ outputIt("window"); …

Member Avatar for Narue
0
316
Member Avatar for LucyB

Hi again, Suppose we have an array. Array(3). The user has written 5, 6, and 7 to (0) (1) (2) within that array. How would I add them up? If it's like Array(0) + Array(1) + Array (2) that's all very well but.. What if the array size was (10). …

Member Avatar for William Hemsworth
0
224
Member Avatar for jorgeberber

Im trying to add a subtotal to my script but i cant think of a way , i tried adding another function to it so it would calculate the subtotal as i go but it wont happen ... . Also i tried returnig the value of this function to another …

Member Avatar for Lerner
0
168
Member Avatar for noodlecode

I took a class on C++ a few months back. I just finished reading Sams "teach yourself C++ in 21 days" which took me way longer than 21 days to finish. but i feel like i have a basic understanding of the language that was presented in that book. The …

Member Avatar for MosaicFuneral
0
93
Member Avatar for u8sand

Hello guys. I made a simple program that works like command prompt. You insert a command, it inserts it into system(); why i do this? because im also adding my own commands. so before it goes into system. it checks first if its one of my newly made commands. Whats …

Member Avatar for u8sand
0
166
Member Avatar for yasserovic

This challenge is ( large and easy ) at the same time .. Those who accept this challenge and want to join the fun and interest, We Will take The Best first Program ,, and he will be The " WiNnEr", ================================================ Description The aim of this project is to …

Member Avatar for Murtan
0
122
Member Avatar for Dannyo329

Does anyone know a decent site for studying about ctime(or time.h) in c++ thats good and doesn't end up telling you its in C?:@ :-/ Cos' when I search on google and I when thought I had found a great site, its actually for C programmers. Any help would be …

Member Avatar for Narue
0
125
Member Avatar for perfect_girl

[COLOR="Red"][B]I have A project and I need someLibraries in opencv and join it with c++ but I didn't know how to but it Is there any books can help me and where can I find the libraries for opencv?[/B][/COLOR]

Member Avatar for oanluir
0
152
Member Avatar for u8sand

Hello everyone. I want to know how to get my internet IP without going to a "www.ip-address.com" or somthing to get it. I thought about using winsock, but i am still a winsock beginner. I want to connect to 127.0.0.1 (loopback ip) and do a GetHostInfo() command of some kind …

Member Avatar for u8sand
0
185
Member Avatar for sai56

I am using visual 2008 c++ and office,by using the method which taught in [url]http://www.codeproject.com/KB/office/automate_excel.aspx[/url] to link one of the form of the project to excel, it works.However, when I try to link another form of the same project to the excel ..it fails It gives out the following error: …

0
47
Member Avatar for daviddoria

Anyone see a problem with this line? My Color header is included (I use it all the time). map and vector are included. [code] void GenerateColors(map<Color<unsigned char>, int> &Map, vector<Color<unsigned char> > &List, int num) [/code] I don't see anything wrong? Dave

Member Avatar for StuXYZ
0
158
Member Avatar for osan

Hi, I have a code and I want to add a .cpp file that I made and use the functions that I've done in that .cpp file. So at this project I am adding the ekf.cpp file and then included....but I get this errors. 1>Linking... 1>ekf.obj : error LNK2005: "void …

Member Avatar for Ancient Dragon
0
281
Member Avatar for Erikmmp

Hi, The program I'm making to teach myself C++ uses a user-specified file and then does the opening and read/write whatever stuff. The error i get is this when trying to compile the read_file.open(in_file) line: "no matching function for call to 'std::basic_ifstream,char, std::char_traits> >::open(std::string&)'" Please help Thanks [CODE=C++]#include <iostream> #include …

Member Avatar for Erikmmp
0
123
Member Avatar for egolovin

[CODE]#include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <windows.h> #include <ctime> #include <conio.h> #include <ctype.h> #include <iomanip> using namespace std; void gotoy(int y); void timechange(time_t start1); void timeevent(); int boost=0; int Eboost=0; int power=40; int HP=100; int EHP=100; int Epower=10; int dtime=0; time_t start, end,start1; int main() { start=time(NULL); …

Member Avatar for Comatose
0
135
Member Avatar for aiyer

Hi, I have this sample program where the compiler gives me error for the break statement. The error is " misplaced break in afunction" Could anyone help me understanding why the break statement gives an error? i understand that u can use break in a for , while loop etc., …

Member Avatar for Comatose
0
741
Member Avatar for LucyB

Is there a way to have an array with an undeclared size? It would automatically put the data into the appropriate subscript without delaring the subscript each time. So something like this int Array[] Array + 1, Array + 1, Array + 1, <<array; (equals 3 ) Instead of something …

Member Avatar for Narue
0
69
Member Avatar for 72246

calculate the value of pi from in finite series pi=4-(4/3)+(4/5)-(4/7)+(4/9)-(4/11).... print a table that shows the approximate value of pi 1,000 terms series

Member Avatar for StuXYZ
0
256
Member Avatar for tigerfan88

I'm trying to develop a program that takes input from the user (an odd number between 3 and 25) and then uses that to display the magic square for that number. This is what I have so far: [CODE]#include "stdafx.h" #include <cstdlib> #include <iostream> using namespace std; const int MAXBOARD …

Member Avatar for Freaky_Chris
0
122
Member Avatar for h3llpunk

hi i have just begun C++. I already put some time in learning this so i now a few basics like creating a class and pointers and such. but ive only been able to get a simple dos-window. I know there is a window.h class that creates normal windows but …

Member Avatar for h3llpunk
0
130
Member Avatar for dewyatt

I'm trying to write a conversion function. I want to be able do something like this: [code=cpp] //ConversionType_1 Convert<ConversionType_1>("Abc123"); //ConversionType_2 Convert<ConversionType_2>("Abc123"); [/code] I want to be able to switch between different data sets. The solution I've come up with so far seems less than optimal to me: [code=cpp] enum ConversionType …

Member Avatar for dewyatt
0
118
Member Avatar for kiranraj1992

plz help me. i want c++ code 4 this Write a function name PAYMENT that calculates the wages for a given number of hours worked and hourly pay rate. the number of hours worked over 60 is to be paid at the rate of one and a half times the …

Member Avatar for Freaky_Chris
0
96
Member Avatar for moaath

gentlemen... I don't want you to solve it for me all what I want is to give me some hints how to solve this question... for example what kind of function you recommend me to use and what kind of loops you recommend me to use also ..... Write a …

Member Avatar for MosaicFuneral
0
218
Member Avatar for dirnthelord

I am using VC++ 2008, and i am trying to create a little software to search for a folder and explore it in a new window.(like I open/explore c: drive) I don't need to browse for the folder and open it from there. I tried using 'ShellExecute' but didn't work.when …

Member Avatar for dirnthelord
0
111
Member Avatar for blumisa

Help .. I'm supposed to make a java program that will create an output of increament whre the last number is 10 and the series is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .. it's like counting to 10.. we're supposed to use a do-while loop or …

Member Avatar for iyercb
0
86
Member Avatar for aryansmit3754

sorry if i posted in wrong forum.pls forgive me pls tell how to find bfs successor of a node in a tree(BST and binary tree)

Member Avatar for Nick Evan
0
83
Member Avatar for TheEnd2020

Can anybody help me with structures in C language coz i dont not know a thing and i have this assignment that is due next week wednesday.

Member Avatar for Narue
0
33
Member Avatar for dirnthelord

I am using VC++ 2008, and i am programing a little software to search for a folder and open it. My problem is i have no idea how to open a folder. Please help

Member Avatar for Nick Evan
0
122
Member Avatar for dm215

Hello, Thanks in advance for any help. I am running a fairly good-sized MPI-C++ code, and I am getting a frustratingly unreproducible segfault. I am also having trouble with gdb (I think because of my MPI implementation), but I think the problem may have something to do with the fact …

Member Avatar for dm215
0
100
Member Avatar for vishal_tulsiyan

the problem is as follows i ahve to build a software in c++ which would be able to perform biomatrix operations. it means that: it scans your face.. stores it into its file or database.. for the next scan.. it should compare with all the previous stored file and should …

Member Avatar for Nick Evan
0
93
Member Avatar for integer*09

Hi all, Good day to all. I trying to do a program using VC++ window form that involved loading the data from .csv file and displayed it into the window form with labels. Vice versa, when the user key in data, four of the below show column values will changed, …

Member Avatar for integer*09
0
2K
Member Avatar for dvsConcept

im currently a college student and im studying c++ at the moment. i need to create a multi array for name and password (but it will be from user input) not to mention i cant write to this array until i confirm it doesn't already exist in this array. Im …

Member Avatar for dvsConcept
0
82
Member Avatar for smithss

Hi, so i wrote a few of the programs on my own after all the help previosuly but i've got stuck in this one here. The point is the make the string alteast 'n' characters long by padding spaces to its right. [code=c++] #include <iostream> using namespace std; void padRight(char …

Member Avatar for smithss
0
139
Member Avatar for winrawr

what would I use pointers for? I used to have a vague understanding of a pointer... like, *ptr is the value pointed to by the pointer, ptr is the address the pointer is pointing to, and &ptr is the address of the pointer itself? or something? the one example I …

Member Avatar for winrawr
0
109
Member Avatar for robotnixon

So I'm working on a C++ program and part of it involves converting decimal numbers to hexadecimal. I have been using printf("%02X",number) to do this, but I'd like to print to a text file. Just wondering if anyone knew of a way to send formatted text to file rather than …

Member Avatar for Ancient Dragon
0
92
Member Avatar for DeboJackson

Ok I have this problem which is very simple yet I can't find the solution anywhere. I have a simple function: [CODE] bool MyClass::close(int fd) { // code shutdown(sockFd, 2); close(sockFd); //code } [/CODE] This function does a lot of work and one of the things it needs to do …

Member Avatar for grumpier
0
156
Member Avatar for P.I.M.P

3. Using User Defined Functions do the following question: my_array = { 3, 61, -5, 38, -17, 21, 92, -64, 41, -6} Find the sum of odd and even numbers in the array !!please help me to answer this question!!

Member Avatar for VernonDozier
0
143
Member Avatar for rottmanj

I am working on an application that requires me to connect to a remote odbc connection. Right now I am currently using an external application called dbtcp that allows me to do this. I would prefer to not have to do it this way. Does anyone know of an existing …

0
55
Member Avatar for noodlecode

is it correct to say that to take advantage of polymorphism at runtime, all of the base class functions that will be overriden must be virtual. If they are not, then you are really utilizing polymorphism at compile time? Do you guys use virtual sparingly, or frequently?

Member Avatar for Narue
0
94

The End.