49,761 Topics

Member Avatar for
Member Avatar for Bhawana Pant

program to count the number of characters in any string excluding the blank space.

Member Avatar for John A
0
120
Member Avatar for cylow22

hi there, like almost everybody else here i've got a problem. I am working on a simplified IRC for unix, consisting of a server and a client. It's a task for university.. my problem is, my client receives strange signs from the server and when i want to parse them …

Member Avatar for cylow22
0
99
Member Avatar for shila13

Could someone help me with the explanation of the codes below? thanks [code=cplusplus] #include<iostream.h> #include<conio.h> #include<process.h> int a[9][9]={0,0,9,0,0,0,0,2,0, 0,6,0,0,0,9,0,0,5, 0,0,0,8,7,0,0,0,0, 0,0,1,0,8,0,0,0,0, 0,4,0,5,0,7,1,3,0, 6,0,0,0,1,0,4,0,0, 0,0,0,0,4,8,2,0,0, 7,0,0,6,0,0,0,5,0, 0,9,0,0,0,0,8,0,0}; int b[9][9],k,l,m,z,flag=0,g,h; int horizontal(int,int,int); int vertical(int,int,int); int box(int,int,int); int assume(int,int); void main() { clrscr(); cout<<"enter values\n"; for(int i=0;i<9;i++) for(int j=0;j<9;j++) cin>>a[i][j]; for(i=0;i<9;i++) for(j=0;j<9;j++) b[i][j]=a[i][j]; …

Member Avatar for iamthwee
0
95
Member Avatar for scias23

i have written this program, it's nearly finished, but i didn't found out right away that my code has bug.. once i enter number of students i wish to add, the value goes to the for loop, i think i coded that just fine, but the problem is, for example, …

Member Avatar for StuXYZ
0
132
Member Avatar for Mighty

Hello everyone. I am taking a C++ program at my college.. and i find it pretty difficult honestly.. but, i have to get the hang of it due to my major. If someone could help with this problem It would be appreciated.. A retail company must file a monthly sales …

Member Avatar for preet4fun
0
394
Member Avatar for EZO

Hello, and welcome... I have a small question about class functions. Before anythig to understand my problem, when I have this file "test.h" which contains: [code=cplusplus] #ifndef TEST_H #define TEST_H class aFile { private: char *src; char *dst; public: void Copy(char *src, char *dst); }; #endif//TEST_H [/code] Also I've another …

Member Avatar for EZO
-1
113
Member Avatar for DirtyBird

Hello all, I had previously written a short program to find the factors of any integer. Fortunately, it works flawless and without any problems. However, I want to edit this code so that the program adds up all the factors of that certain integer. Can anyone shed some light as …

Member Avatar for u8sand
0
105
Member Avatar for h3llpunk

Hi C++ is my first language i am learning and i would like to start some project that involves a bit of AI and object avoidance but i have no idea where to start. My skill in C++ is pretty poor but i would like to start a small project …

Member Avatar for u8sand
0
94
Member Avatar for MyRedz

all i can think i will type here and please explain the others.thank you this is just to enhance my knowledge about oop.The info i got now isn't enough... q1 Write a simple program to ask user to input five digits number. Using the input, output the five digits number …

Member Avatar for arun_lisieux
0
138
Member Avatar for mtucker6784

Hi folks! I'm not a student, so this isn't a homework assignment, I'm just trying to learn C++ for my own benefit and my career. My question is: is it possible to call a function that's below another function? If not, how could I do this? For example, in the …

Member Avatar for mattwaab
0
97
Member Avatar for jorgeberber

Hi all!!! simple question , i have included a txt file in my program which holds names and numbers like this Alan 23 Bob 50 Joan 35 i want to know if it is possible to do a search in that file by the name and return the corresponding number …

Member Avatar for jorgeberber
0
131
Member Avatar for avillachandok

hi, can someone please tell me what is the no. estimated for compares and data moves required by these three algorithms to sort N strings. And what is the order for calculating the time measurement to sort these strings. thanks.

Member Avatar for vmanes
0
122
Member Avatar for sid78669

I have recently been doing an assignment which had us making a text editor. What I was trying to do is to get the terminal screen size so that I could use the coordinates. Can somebody tell me how I can save the environmental variables as integer values? I googled …

Member Avatar for sid78669
0
154
Member Avatar for rosenberg_a

I have a header file and a cpp file that i cannot get to compile. The exercise in the book states i need to make a static char of the months. But for some reason i am having trouble initializing the static char[12][25] array for the 12 months. Getting error …

Member Avatar for Ancient Dragon
0
149
Member Avatar for winrawr

I'm using a windows port of gcc, g++, etc. as a compiler. How would I compile a DLL, and define/use its exports? Can I compile header files, classes, etc. into a DLL or only functions? Can DLL functions call functions in a program, or is it only one-way? For example, …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Phil++

Hey there, the problem that I am having is that I'm trying to make a simple scripting language that is coded in notepad, then opens the Engine and it displays the code in a console window. I am currently stuck at displaying text on the screen, if I enter a …

Member Avatar for StuXYZ
0
108
Member Avatar for serkan sendur

swap.h : [CODE]#pragma once class Swap { public: Swap(void); public: ~Swap(void); public: void SwapNumbers(int & number1, int & number2); public: void SwapNumbersViaPointer(int * pNumber1, int * pNumber2); };[/CODE] swap.cpp : [CODE]#include "Swap.h" Swap::Swap(void) { } Swap::~Swap(void) { } void Swap::SwapNumbers(int & number1, int & number2) { int tmp = number2; …

Member Avatar for serkan sendur
0
164
Member Avatar for rosenberg_a

[CODE] const char *getName() { return name; } [/CODE] Looking at the following code which is a member function of a class, why would one pass the array of a person's name as a pointer and lock it so it cannot be modified when they can just pass a copy …

Member Avatar for StuXYZ
0
154
Member Avatar for Sam_Surrey

Hi everyone, im not competely new to C++ but we are being asked to create a new program for converting celsius to farenheit which is an easy code set, but we have to create it using seperate units, which i have to admit is massivley confusing me ! [code=cplusplus] #pragma …

Member Avatar for ddanbe
0
136
Member Avatar for real_castilla

Hi all, I'm a newbie with C or C++. I have a raw PCM file 16-bit (like a wav file but no header). I need to build a console application that can read the file, store data in an array, modify it (ex: add 100 to each value of the …

Member Avatar for rafi867
0
4K
Member Avatar for daviddoria

[code] double P = 3.5/(.1 * sqrt(2.0*3.14159)) * exp(-pow(5.0,2) / (2.0*pow(.1,2))); cout << P << endl; if (P==0) cout << "P is zero!" << endl; [/code] Is this underflowing so it is getting rounded to zero? The problem is that I am taking the log of this, so if it …

Member Avatar for Rashakil Fol
0
114
Member Avatar for daviddoria

I wrote a pause function: [code] void Pause(void) { printf("Paused...\n\n"); fgetc(stdin); } [/code] It generally works fine (hit enter to continue). But one program doesn't seem to want to stop at all... [code] if(P == 0) { cout << "P=0!" << endl; //just as another attempt to stop it , …

Member Avatar for Nick Evan
0
148
Member Avatar for are_nice

can u give me an example of a program like this? write a program that allows the user to play the game called the secret number with the comp. the user will try to guess the secret number, a number known only by the comp. this secret number is an …

Member Avatar for Nick Evan
0
65
Member Avatar for adarrell

Hi, I have been trying for several hours without success to write a function that takes a filename, opens the corresponding file, populates a std::vector<double> with values from the file, and returns the std::vector<double>. I can't get past the passing the filename stage unfortunately, despite reading about this here there …

Member Avatar for Nick Evan
0
206
Member Avatar for ishaanarora

Suggest a nice college project for subject named Object Oriented software engineering ...preferable coding language is C++.............

Member Avatar for Freaky_Chris
0
116
Member Avatar for dhpatil1

I'm getting the following exception "ORA-24960: the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255" when using Environment:createConnection. I'm using VisualC++ 8.0 and Oracle 10g R 10.2.0. Below is the snippet of code that creates the problem:[code] #include <iostream> #include<occi.h> using namespace oracle:cci; using namespace std; try{ …

Member Avatar for Agni
1
2K
Member Avatar for yasserovic

who can find the Errors in this statments ; 1-[CODE]Assume that: char str[ 5 ]; cin >> str; // user types "hello" [/CODE] 2- [CODE=c]int *zPtr; // zPtr will reference array z int *aPtr = 0; void *sPtr = 0; int number; int z[ 5 ] = { 1, 2, …

Member Avatar for Murtan
0
179
Member Avatar for rosenberg_a

I basically got all the errors out of this software program i am doing for my own study, not for school. But i keep getting an error saying that in the main program before the cout it is missing a ;. This leads to believe i am missing a ; …

Member Avatar for rosenberg_a
1
139
Member Avatar for computercobra

Heres my problem. I can add a node to my linked list in the front and middle, and at the end. But if I add a node to the end of the list and try to print it out, the program crashes. I studied the code and didn't find any …

Member Avatar for computercobra
0
121
Member Avatar for serkan sendur

i tried to see the preprocessed file after it is preprocessed. i created den.cpp : [CODE]#define PROC_ERR(MSGSTR, DO_ACTION) \ { \ cerr << MSGSTR << endl; \ DO_ACTION; \ } PROC_ERR(error,action)[/CODE] i run the following command on unix command prompt to create the preprocessed file : [CODE]g++ -E -o den.i …

0
58

The End.