49,761 Topics
| |
program to count the number of characters in any string excluding the blank space. | |
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 … | |
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]; … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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, … | |
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 … | |
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; … | |
[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 … | |
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 … | |
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 … | |
[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 … | |
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 , … | |
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 … | |
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 … | |
Suggest a nice college project for subject named Object Oriented software engineering ...preferable coding language is C++............. | |
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{ … | |
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, … | |
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 ; … | |
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 … | |
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 … |
The End.