49,757 Topics

Member Avatar for
Member Avatar for caltech

Here's the full assignment: [QUOTE]The ABC Corporation wishes to review a group of its products based on their performance in the prior fiscal year. The company has the sales data for these products for each quarter in the year. Having heard of your programming experience, the company has hired you …

Member Avatar for caltech
0
137
Member Avatar for KRUX17

Hi, I was wondering is there a way where you can sell limited tickets. For example there are 55 seats in a bus and 55 people bought the tickets for the bus,the people who want to buy those tickets for the bus must wait for an hour. How would I …

Member Avatar for KRUX17
0
245
Member Avatar for timkunce

I am only allowed to use int, unsigned int and float. Must be accurate to the 7th significant digit. Currently I overflow 'float top' at an x value greater than 13. Thank you for your time. [CODE] #include <iostream> #include <iomanip> using namespace std; float sum=1,x, top=1,factoral=1; int main(void) { …

Member Avatar for Se7Olutionyg
0
4K
Member Avatar for shahinkey

Dear all, I have problem with reading from ini file. My code is as follows, but it has Error with GetPrivateProfileInt. It cannot read and the error is : error C2664: 'GetPrivateProfileIntW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion …

Member Avatar for AritraP
0
283
Member Avatar for torrm

Hello all. A friend is shipping some items in a container so it gave me the inspiration to write a quick little program. This only took 20minutes at best so please bear that in mind. The basic idea is if the containers size is known, and the cost is known …

Member Avatar for Labdabeta
0
425
Member Avatar for vlaskiz

Currently working with graphical interface and dynamic object arrays, Got two text files with kinda same data on it, my current task is just to read and output that data. Problem is most likely either with my read function or function to determine how much data there is in files …

Member Avatar for vlaskiz
0
609
Member Avatar for alenD

Hi all, I am doing something like this int f(){ umap::iterator p = mmap.find(s); if(p != mmap.end()){ ....... } } My memory usage is somehow constantly increasing. While exiting the function do I need explicitly delete the iterator p? Thanks in advance, _alen

Member Avatar for MastAvalons
0
584
Member Avatar for faraz ahmad

Aoa, Hello All, i am having problem in this question Write a program that takes integer input from the user and store into the array dynamically allocated each time a new element is added. Your program should prompt user to take integers until he enters -1, which means end of …

Member Avatar for MastAvalons
0
342
Member Avatar for capton
Member Avatar for DeanMSands3
0
407
Member Avatar for tom12

#include <iostream> #include <string.h> using namespace std; int main() { char clear[200]; char cipher[200]; int x,i; cout<<" Enter a string:"; cin.getline(clear,sizeof(clear)); x = strlen(clear); for(i=0;i<=x-1;i++) { cipher[i] = clear[i]+3; } cipher[x] = '\0'; cout<<" Encrypted:" << cipher << endl; system("pause"); return 0; } Hey guys hope someone could help me, …

Member Avatar for tom12
0
192
Member Avatar for learner guy

I want to find if Array B is present in array A(B is a substring of A).. i have written this small function but its not working as desired ..can anybody plz help and point out where i m wrong [CODE] bool substring(char A[],char B[]) { int aSize=strlen(A); int bSize=strlen(B); …

Member Avatar for Ali_2101
0
346
Member Avatar for mweshk

Dear Gurus, I am having this inventory program but can not give me the desired results.What am I doing wrongly? I want a user to enter and display results. [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <cctype> using namespace std; const int DESC_SIZE = 51; // holds inventory description …

Member Avatar for Ali_2101
0
687
Member Avatar for sharath_137

hi , I was trying to open a file using fopen() method. It's not opening all the time. some time it opens but the other time its getting crashed.... FILE* tmpfile = fopen(xxxxxx, "r") this is the code i am using.... and every time the value of xxxx is coming …

Member Avatar for Ancient Dragon
0
88
Member Avatar for navinrahim

Rewrite the following program after removing the syntactical error(s) if any. Underline each correction. [CODE]#include<iostream.h> #include<conio.h> class employee { int no; class data { int dd,mm,yy; public: void print_data() { cout<<dd<<mm<<yy; } }; data dob; public: data doj; void prin_t() { doj.print_data(); cout<<dob.dd<<dob.mm<<dob.yy; } }; void main() { employee 1emp; …

Member Avatar for deceptikon
0
143
Member Avatar for solarcoder

I was tried to debug to find an explanation to this but i still don't really understand the concept. Here goes. [CODE] //pass in value //973 456.2 77F //973 456.2 77F #include<iostream> using namespace std; int main() { char letter; int n; float m; cin>> m; cin.clear (); cin.ignore (200, …

Member Avatar for deceptikon
0
150
Member Avatar for ads1188

Hello All, I have starting using Visual Studio Pro 2010 and I understand the very basics in programming. Currently I am trying to create a login system where users enter their usernames and passwords. I have been experimenting with trying to link Access database to MySQL but im having no …

Member Avatar for ads1188
0
263
Member Avatar for prasenjit_das

hi all, I am trying to develop autocad like software in c and c++ .Which c and c++ editor is best to develop software..editor must be support graphics program in c and c++.. please give me suggestion ,link,and tutorial learn something

Member Avatar for Ancient Dragon
0
60
Member Avatar for tom12

#include <iostream> #include <string.h> using namespace std; int main() { char test[256]; int x,i; int vowels; cout<<"please enter a word"; gets(test); x = strlen(test); for(i=0;i<=x-1;i++) { if(test[i]!=' ') { cout<<test[i]<<endl; } if (test[i]=='a' || test[i]=='e' || test[i]=='i' || test[i]=='o' || test[i]=='u' || test[i]=='A' || test[i]=='E' || test[i]=='I' || test[i]=='O' || …

Member Avatar for Ancient Dragon
0
922
Member Avatar for prasenjit_das

hi all, I do not understand how i concatination of two string using pointer in c++. please can you give sugestion how i implement.. thanks in advance

Member Avatar for L7Sqr
0
160
Member Avatar for tastybrownies

Hey everyone, I am pretty new to writing procedures that deal with this idea of recursion. I am trying to get into that certain frame of mind but I am having a little bit of trouble at the last minute. My goal was to implement a text operation called swap …

Member Avatar for jmichae3
0
226
Member Avatar for jmichae3

I am going to assume that gcc is the compiler people are using on their *NIX. so for that, I know that [CODE]#if defined(__GNUC__) [/CODE] will work. SO... for Centos, Solaris, HPUX, AIX, Linux, BSD, FreeBSD, OpenSUSE, Fedora, redhat, what #if defined()'s do I use to detect these OS's?

Member Avatar for L7Sqr
0
114
Member Avatar for SamuraiGhost

I believe that my program in the attached file is almost finished. When I try to run the program,there are two error message that pop up. The error are the following: 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>c:\users\usr\documents\visual studio 2010\Projects\NEWLDIST\Debug\NEWLDIST.exe : fatal error LNK1120: …

Member Avatar for DJSAN10
0
235
Member Avatar for nahmartin

Hi, I am having trouble outputting to many files [CODE] ifstream sim_dump; sim_dump.open("c_grain.sim_trj"); char dump_file[20]; int itr = 4000; sprintf( dump_file, "%d", itr); ofstream fout(dump_file); while(lammpsdump.good()) { //if(itr % 100 == 0) //{ fout.close(); sprintf( dump_file, "%d", itr); ofstream fout(dump_file); cout << "TIMESTEP " << itr << endl; //} ... …

Member Avatar for nahmartin
0
160
Member Avatar for ruval002

ok so first of all my following code its suppose to read input from user and seperate the strings into commands and arguments.For example if i input changeDir hello , the tokenizer(which i already implemented) will split it and put changeDir into tokens[0] and hello into tokens[1]. Now what im …

Member Avatar for ruval002
0
159
Member Avatar for scottd82

Hey everyone, I wrote some code to create a deck of cards, described the deck and randomly deals 5 cards. First, I want to let everyone know that this is homework for my C-II college class, so I am not looking for any answers, but solutions or guidance in figuring …

Member Avatar for WaltP
0
1K
Member Avatar for Sh0gun

I'm trying to find the mode of a vector full of ints. To do so I created a map an tried to make it so that evey time a number occurs it increments the related key on the map. Right now I'm just getting the highest number in the vector …

Member Avatar for subith86
0
174
Member Avatar for free2move

I need to sort a series of 25 numbers, entered by the user from smallest to largest, then count the number of times the user entered the number "10". I can't use arrays and I have to use only for loops, can someone please help?

Member Avatar for free2move
0
2K
Member Avatar for mechanicallogic

I simply cannot figure this program out (nor why I am going in debt paying professors to "teach" me). Our assignment begins with reading a data from a file and storing it in an object array and then displaying the contents of that array. When I compile the program in …

Member Avatar for Ab000dy_85
0
221
Member Avatar for rayy

hi everybody, i would be glad if someone could show me how the Get and Set functions work. thanks.

Member Avatar for promod
0
114
Member Avatar for jtreiner

I am using Irrlicht with code blocks on a Mac osx. Whenever I try to run the Irrlicht wizard in code blocks I get an error that says "The path you entered seems valid, but this wizard can't locate the Irrlicht's library file in it." I am using the most …

0
136

The End.