49,757 Topics

Member Avatar for
Member Avatar for iamthesgt

Okay, we had an assignment in computer class that I have been working on for awhile but what I've got so far isn't working. It seems that it may be a compiler issue, but since I can't get to a linux compiler (what the program will be evaluated on), and …

Member Avatar for iamthesgt
0
166
Member Avatar for skips

My problem is that I need to write a program that asks the user to input a number from 1-99 and outputs the number spelled in english. I believe that I have the general outline down in that I will break it up into statements using If and Switch statements. …

Member Avatar for Red Goose
0
127
Member Avatar for Abelville

Im getting this error and I am so new at this that I have no idea how to correct it. If someone has any suggestions. Programming for 10 weeks! [CODE]#include <iostream> #include <string> #include <iomanip> using namespace std; int InputData(string [], int []); int main() { string players[99]; int score[99]; …

Member Avatar for Abelville
0
191
Member Avatar for Scooterman1

So I've been working on a program that takes a string and then puts it in an i * 6 char array but I can't seem to get it to work, any help with the problem would be much appreciated. Here is the unsatisfactory code I have so far: [CODE] …

Member Avatar for Scooterman1
0
377
Member Avatar for mohamed_nasr

At debugging the code, the program gives 2 errors Error 1 error LNK2001: unresolved external symbol _mainCRTStartup Error 2 error LNK1120: 1 unresolved externals

Member Avatar for mohamed_nasr
0
585
Member Avatar for banh

I am trying to learn C++ ifstream i came across this code on the net and have some question. void read() { ifstream inFile ("in.txt"); string l, i; int item = 0; while (getline (inFile, l)) { // is this one checking end of file like java? istringstream linestream(l); // …

Member Avatar for banh
0
163
Member Avatar for nips

hey guyz.i have a c++ code using structure arrays.I want to sort the records by id and by age(using 'sort' function)and by name (using 'sortN' function). My problem is i cant figure out how to pass the records to the relevant functions from the'main' function and also how to get …

Member Avatar for sahil1991
-1
53
Member Avatar for trante

I use Visual Studio 2005 on windows XP. I'm trying to use "Google Test" framework. But i couldn't manage to make just one test because of linker errors. I built Google Test, thank created new project. Then made the steps written in [URL="http://stackoverflow.com/questions/531941/how-to-setup-google-c-testing-framework-gtest-on-visual-studio-2005"]this link[/URL] to the project properties file. Than …

Member Avatar for trante
0
525
Member Avatar for thelerner

hye all :) can u help me with this code: [CODE]int list[4][4] ={7,23,12,6, 2,1,4,10, 65,15,33,8, 18,26,42,12}; int i,j; for (i=0;i<4;i++) { for(j=0;j<4;j++) { cout<<list[i][j]; } }[/CODE] there's output but i want it to display 4X4

Member Avatar for daviddoria
0
140
Member Avatar for KazenoZ

Hello, I'm having this problem in my code that I just can't figure out the reason to, I'm trying to set an integer value to an integer variable that's a member of a class that is part of an array member of another class. It should be an int = …

Member Avatar for KazenoZ
0
578
Member Avatar for becool007

Okay so this is getting on my nerves now. Say I have a string like this "The average value for box 1 is:" and I have a float variable containing digits. How do i make the final result like this: "The average value for box 1 is: 12.01" ?? In …

Member Avatar for ravenous
0
110
Member Avatar for kcarl

Hey Guys n Gals Im a newbie here and I am having trouble with putting input into a two dimensional array. What I have to do is put the users numbers (integers not doubles) into a matrix add them, subtract them and multiply. I have most of my code written …

Member Avatar for ravenous
0
136
Member Avatar for petero_l

Hello it is my first time here and I just started C++ so hopefully my question isn't too dumb or anything: I was writing this thing that can do geometric series and arithmetic series. I can write the geometric series code alright and the arithmetic series code alright but once …

Member Avatar for petero_l
0
251
Member Avatar for jhollie

#include <iostream.h> #include <conio.h> #include <stdlib.h> #include <dos.h> #include <string.h> #include <stdio.h> #include <graphics.h> #include <process.h> char board [3] [3]; void rules(void); void help(void); void play(void); void restart(void); void credits(void); void draw(void); void printplayer(int); void printcomp(int); void result(void); char name[100]; void input(void); void input2(void); void mapboard(void); void main() { int …

Member Avatar for chrjs
-1
143
Member Avatar for somshridhar

[CODE]// istream get #include <iostream> #include <fstream> #include<string> #include<cstring> //#include<sstream> using namespace std; int main () { char c, str[256]; ifstream is; cout << "Enter the name of an existing text file: "; cin.get (str,256); is.open (str); // open file ofstream was; was.open("output.mvw"); string st ("There are two needles in …

Member Avatar for WaltP
0
170
Member Avatar for PerplexedWon

My problem: I am now able to get the program to compile, however, when i call the functions to count the number of consonants or vowels, the numbers are not what I expect. Instructions: Write a function that accepts a pointer to a C-String as its argument. The function should …

Member Avatar for PerplexedWon
0
768
Member Avatar for zarbhebz_1012

Hi im a c++ beginner and i'm doing a tic tac toe program hollywood squares style only with math questions. what im trying to do here is im trying to insert a timer such that the player only has 20 seconds to answer each question or he/she loses his/her turn.. …

Member Avatar for WaltP
0
133
Member Avatar for AnonymousX

Well, i'm working on a text Editor. I'm still a little nooby with C++. I'm trying to create a Goto Line Command. Would someone give me an example of how to do it? Thanks :P

Member Avatar for chrjs
0
342
Member Avatar for lexusdominus

Hey guys. Im writing a console based application which i want to convert to a windowed application. however, i still want the user to be able to type in input and for my program to be able to output in a console based style, i'd just like the option to …

Member Avatar for lexusdominus
0
205
Member Avatar for glenn_boy13

please help me guys :). I found several articles about preventing the user from entering characters but I can't understand them. [ICODE] int num_sub;//subjects setcolor(143); cout<<"Enter the number of subjects:"<<" "; setcolor(15); cin>>num_sub; if(isdigit(num_sub)==0){ cout<<"CONTINUE"; } else{ cout<< "\n numbers only!"; exit(0); }[/ICODE] here in my code: when I enter …

Member Avatar for Nandomo
0
118
Member Avatar for Mayank23

how can a user be able to type what ever he wants such as " i went to the park...", i tried to do it but with my string variable it only read the first word typed in, such as i in this case. please help.

Member Avatar for Mayank23
0
165
Member Avatar for lochnessmonster

[CODE]i understand int cars[23]; can be accessed using pointer notation such as... int cars[10]; int *carz; *(carz+1); // carz[1]; im curious as to what the equivalent pointer notation would be for a structure..for example struct car { int wheels; float gas; float engineHP; }; struct car cobalt; cout << cobalt.engineHP …

Member Avatar for VernonDozier
0
144
Member Avatar for Nandomo

Next week I am going to begin learning about linked list, I know very little currently. Are there any well written explanations of linked list online? Or can someone explain the logic to me. Want to have a background before I start learning it from my professor.

Member Avatar for Nandomo
0
94
Member Avatar for MultipleMoney

Here is my code so far for my program: [CODE]#include<iostream> using namespace std; int main() { int number; int guess; char reply; srand (time(NULL)); number = rand() % 1000 + 1; do { do { cout << "Guess the Number" << endl; cin >> guess; if (guess > number) { …

Member Avatar for MultipleMoney
0
1K
Member Avatar for tupac03
Member Avatar for juangalvez4

This week in class we are looking at functions and how to use them. This is the example we got during class: [CODE]#include <iostream> #include <string> using namespace std; //function prototype int getTotal(int,string); void verifySeasons (int&); int main() { string name; // name of player int totalGoals = 0; // …

Member Avatar for pseudorandom21
0
134
Member Avatar for Prasanna Venkat

Hi friends, I am a final year Mechanical Student and I am doing my Final year project in C++. My project requires some complicated programming in C++.. Here are the details. Initially I need to create a random matrix. The user will give the no of rows and columns. For …

Member Avatar for pseudorandom21
0
179
Member Avatar for fabricetoussain

[CODE] /* Fabrice Toussaint section N938 Feburary 1, 2011 Purspose of program is to locate centroid and find distance between all three points and centroid */ #include <iostream>// for cout and cin #include <cmath> // for sqrt () and pow (x,y) using namespace std; int main () { float distance1; …

Member Avatar for pseudorandom21
0
111
Member Avatar for L3gacy

I use Microsoft Visual Studio Professional on my Desktop PC, but my GTX 260 just failed and im dojng an RMA, so I started trying to program on my laptop. I am around 1/3 of the way through Ivor Hortons Beginning Visual C++, the book covers Native C++ and C++/CLI, …

Member Avatar for mike_2000_17
0
396
Member Avatar for chamnab

HI Everyone ! Do anyone know how to split string ? Especially this one . Do anyone know funtion "__DATE__" , it show month/date/year. you know ,it is string so i want to separate it because i need month to make condition.

Member Avatar for chrjs
0
105

The End.