49,761 Topics

Member Avatar for
Member Avatar for Clockowl

Hey guys, I've written quite a large piece of code the past few days, and today I've cleaned it up a bit, divided it into functions (I know, bad, should've done it the other way around) etc. etc. The project is a simple 3D thingamadingy, the program is able to …

Member Avatar for Clockowl
0
205
Member Avatar for Nemoticchigga

Does anyone know if vs2005 has the borland equivilent of a "scrollbox"? Thanks.

Member Avatar for Nemoticchigga
0
164
Member Avatar for thatoneguyx

I'm new to C++ and trying to find a compiler I tried using visual 2008 but it didn't work... then I re-installed it and can't even open it so I need to find something else I need something thats noob-friendly and is updated thanks

Member Avatar for ArkM
0
119
Member Avatar for nimloman

I need my output screeen to looklike this. So far i can do all of it except my traingle comes out in a right angle and i dont know how to make it into an traingle shown below. Ive tried usind 'setw" but it doesnt seem to be working. [B]This …

Member Avatar for Radical Edward
0
208
Member Avatar for nnhamane

Hello friends..[B]Ugly number is a number whose prime factors are only 1,2,3 or 5.[/B] I had written a program for finding n`th ugly number in the series.Now the series is 1,2,3,4,5,6,8,9,10,12,15...these are first 11 ugly no`s. Now In my program if we put m=11 then output will be 15. It …

Member Avatar for Salem
0
1K
Member Avatar for Cosa

I am writing a program which reads in a database of albums into an array of structs, the data can then be deleted, modified etc. The problem i am having is that when i try to modify a specific record using a search term and then strcmp to the album …

Member Avatar for Cosa
0
93
Member Avatar for aalhamad

I have a line to pharse like this: 1.2 2 3 4 5 2.4 2.4 2.6 3.5 5.6 3.7 3.4 4.7 3.4 56 I need to sort them in a map of string and vector<double> The problem I'm having is I'm trying to get each colum and store it in …

Member Avatar for ArkM
0
89
Member Avatar for mksakeesh

[code] #include<fstream.h> #include<string.h> using namespace std; class emp { public: char *per; void write() { ofstream out("ss.txt",ios::app | ios::binary); cout<<"Enter some character ....\n"; cin>>*per; //out.write(per,sizeof(per)); out.write(per,strlen(per)); } }; void main() { emp e; e.write(); } [/code] Why this is not working?

Member Avatar for Clockowl
0
160
Member Avatar for nimloman

Example: There are literally hundreds of programming languages. The number of nonblank characters is : 48 So far i have come up with: for (cin.get(inputLetter); inputLetter != '\n'; cin.get(inputLetter)) { if ((inputLetter >= 'A' || 'a') && (inputLetter <= 'Z' || 'z')) numUpper++; }

Member Avatar for ArkM
0
111
Member Avatar for coveredinflies

Hi, I have got to the section on command line arguments on my online textbook. All the information I can find on it seems to assume that I know how to put command lines into my program but I don't have a clue :$ Can anyone help?

Member Avatar for coveredinflies
0
105
Member Avatar for atish00

#include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> class array { private: int A[20]; int ele; public: void input(); void display(); void bub_sort(); void insert(); void del(); }; void array :: input() { int i;char ch[20]; for(i=0; ch[0]!='x'; i++,ele++) { gets(ch); A= atoi(ch); } ch[0]=0; ele=(ele-1); return; } //======================================================================== void array :: display() { …

Member Avatar for atish00
0
101
Member Avatar for Cosa

I have a problem where i want to compare strings, however the comparison cant be case sensitive. I have tried to use stricmp strnicmp strcmpi They do not seem to be part of the <string> or <cstring> libraries on my compiler. I am using the GNU compiler. Is there a …

Member Avatar for Cosa
0
88
Member Avatar for ulquiorra

Hello all, I am in need of some assistence. So if anyone could help that would make my day;). This is a piece of my code [code] for( int i = 0; i <= 13; i++ ) { cout << "SLOT : " << slotNumber; fprintf( HashTable, "\t%i slot : …

Member Avatar for ulquiorra
0
276
Member Avatar for manzoor

[CODE]#include <iostream> #include <vector> using namespace std; // global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' '; const char TIE = 'T'; const char NO_ONE = 'N'; // game function's prototypes void displayBoard(const vector<char>& board); // function that displays the game …

Member Avatar for Ancient Dragon
0
119
Member Avatar for masterjiraya

[code=cplusplus] #include <iostream> #include <string> #include <stack> #include <cctype> //alnum #include <cassert> //assert using namespace std; #include <sstream> string infixTOposfix(string); int evaluarRPN(string); int main () { // main began string infix, posfixWspaces, dummy; double result; char repeat; do { cout << "\nPlease enter the expression in INFIX: "; getline(cin,infix); posfixWspaces …

Member Avatar for WaltP
0
128
Member Avatar for manzoor

[CODE]#include <iostream> #include <vector> using namespace std; // global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' '; const char TIE = 'T'; const char NO_ONE = 'N'; // game function's prototypes void displayBoard(const vector<char>& board); // function that displays the game …

Member Avatar for WaltP
0
102
Member Avatar for pipisumthin

Right now I am learning how to use C++ programming on Linux. I just learned how to copy a file, now the question is, how can you tell if a file has been copied or not? I think I need a command or a function that allows me to check …

Member Avatar for WaltP
0
240
Member Avatar for jonabie

Hey could someone help me bout my problem.... can someone tell me how to make an asterisk frame using for loop statement in C++ and also 1 thing.... how can i display an input letters into an asterisk... eg.. username: bulbulito password: ********

Member Avatar for jonabie
0
266
Member Avatar for nixon623

Hi,im new to c++, i use Dev-C++ to compile my programs i have little problem with ofstream function,i think you guys can help me What program does? Lets say my Computer name is nixon-pc. Program displays text in cmd: "File nixon-pc.html has been created" and than create file C:\nixon-pc.html . …

Member Avatar for VernonDozier
0
144
Member Avatar for lil_panda
Member Avatar for atish00

Guyz I Don't want to write another array function using VOID I wanna do it using pointers for the extra grades...... can ny one give me a clude or just6 a sample code snippet on how to return a 2-D array ?? I have to fing sum of upper half …

Member Avatar for atish00
0
248
Member Avatar for Alex Edwards

I'm having some trouble on deciding to purchase Scott Meyer's Effective/More Effective C++ books or Herb Sutter's Exceptional/More Exceptional C++. I'm assuming both cover the same concepts, but I could be wrong. Opinions/Votes please from C++ programmers that found the one they read useful. There's also an option for both …

Member Avatar for Alex Edwards
0
258
Member Avatar for STUDENT#101

I wish to create a program that will be a quiz game (multiple choice) questions I need to be able to display it and the options and allow the user to use the mouse to click to the option which he thinks is the correct answer. My answers will be …

Member Avatar for STUDENT#101
0
136
Member Avatar for Sundarararjan

Also do tel me what is the process of creating functions in seperate files and referencing them under a single file. I use a dev-C++ for my coding

Member Avatar for Salem
0
76
Member Avatar for dumbokia

i need help on this question. any kind souls can help me? with great thanks. ive already done some part of it but still cant get it working [code=cplusplus] #include <iostream> #include <string> using namespace std; class court { protected: string name, ic, telephone, fn, day; int time; public: court(){}; …

Member Avatar for William Hemsworth
0
103
Member Avatar for dexter1984

[CODE= CPP] //Searching for specific characters while (!stats.eof()) { stats.getline(counter,200); for (int i=0; i<strlen(counter); i++) { if (isupper(counter[i])) upper++; if (islower(counter[i])) lower++; if (isdigit(counter[i])) decimal++; if (isspace(counter[i])) blank++; if (counter[i] == '.') end++; if (counter[i] == '!') end++; if (counter[i] == '?') end++; total++; } } [/CODE] Hi guys, I …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Roy420

The issue I am encountered with is… the same vector we read as double is to be used in another function, but with different data type as mentioned bellow. So I need a conversion function which performs this fact. I have a class as follows [code][i]template <class T> class NRVec …

Member Avatar for Radical Edward
0
130
Member Avatar for masterjiraya

In some of my programs I encounter error message in the middle of the successful start without debugging.... is there a code showing the reason of the error message?

Member Avatar for mitrmkar
0
126
Member Avatar for techie2008

guys, can u help me make a lexical analyzer that outputs invalid/valid only? it would really help if you guys help me with this. this is my midterm project. thanks!!

Member Avatar for techie2008
0
243
Member Avatar for arun_lisieux

Hey ppl, Im currently writing a code for the following problem. " Problem Statement ***Note: Please keep programs under 7000 characters in length. Thank you Class Name: SquareDigits Method Name: smallestResult Parameters: int Returns: int Define the function S(x) as the sum of the squares of the digits of x. …

Member Avatar for arun_lisieux
0
151

The End.