49,761 Topics
| |
I wrote this programme but what two numbers you choose exit it? can you guess just by looking? Because I can't :( [CODE]#include <iostream> #include <string> using namespace std; int main() { bool aHo = true; int a = 0; int b = 0; while(aHo) { cout << "Enter Number … | |
Hi I am currently writing a program that would take a number, then compare that number to numbers in a file that I have opened. I am having a few problems. This is what one of the functions I am having a problem with looks like: the function receives a … | |
Hello all, I have registerd lately, we have a project about the implemention of huffman algorithm...! I have some problem... first is that I want to read space and Enter from txt file how can i do that? Next is how i should output to say that 0 and 1 … | |
The function I am trying to write is supposed to be recursive and does the following: Return the number of ways that all n2 elements of a2 appear in the n1 element array a1 in the same order (though not necessarily consecutively). The empty sequence appears in a sequence of … | |
Dear All, Lately during one of my projects i have encountered a problem and stuck on that point. I have an optical sensor that i have attached to my pc and it detects colors in terms of RGB values. The sensor is from a famous company and has been supplied … | |
Can you please tell me what's wrong? I get this error: error C2447: '{' : missing function header (old-style formal list?) [code] // // Area= 1/2 | (x1y2 - x2y1) + (x2y3 - x3y2) + (x3y1 - x1y3) | // (distance)^2 = (x-difference)^2 + (y-difference)^2 // v= sqrt[ s(s-a)(s-b)(s-c) ] … | |
Hello, I am recompiling a project using Borland C++ builder 6. The recompile process failed due to linker error. The message was: "[Linker Fatal Error] Fatal, unable to open file ABCC.lib" I removed the ABCC references from the project and environment options, but the same error still occurred. I even … | |
I have a Panel that holds 200 buttoncontrols. If I for example minimize the Formwindow and maximize the window again, panel1 that holds the 200 buttoncontrols makes the 200 buttoncontrols to "flicker" for about 2 seconds. I beleive I have set up code for panel1 that have Doublebuffer = true; … | |
Hi all, I did a search on this site to find threads where people were talking about finding a variable length number in a text file and came up with no results. So, I'm asking :) I have a text file with hundreds of lines of data in it. One … | |
Ok so a little bit of background, I am trying to write a boggle solver, I had everything working until I tried to implement a Binary Search Tree for storing the words found on the board, when I tried to do this I got the following errors: Error 1 error … | |
//Define a function that takes a partially filled array of numbers //as its argument and returns the standard deviation of the numbers in //the partially filled array. Since the partially filled array requires //two arguments, the function will have two formal parameters: an array //parameter and a formal parameter of … | |
Hi, Can anyone help me with this problem.For example i have a text file called food.txt with contents 1 apples 2 oranges 3 mango 4 bananna What i would like to do is enter the choice of fruit into a string and loop through the file until the word is … | |
I have to modify the program so that it can read 10 sample points and determine which are contained in the plume boundary. This is my first object oriented class and I have made it run ten times but I dont think that is correct. Please advise.... Thanks. data given: … | |
I have just started using CodeLite. [url]http://www.codelite.org/[/url] It looks impressive.... I was using Codeblocks.But it's lack of features and less frequent stable release has disappointed me.Though, it's subversion is very frequent. I am no expert, but CodeLite looks better then codeblocks. But, if it is better then codeblocks then why … | |
Hi everyone, I just can't seem to find an explanation for using this "->" in code, in C++. I've migrated from Java and C#, and haven't seen this notation before. Basic example: [CODE]CMesh *pMesh = WorldObjects[i]->m_pMesh;[/CODE] As best as I can tell, this is the C++ equivalent of C#'s [CODE]WorldObjects[i].m_pMesh;[/CODE]. … | |
[U]for[/U] i<-1 [U]to[/U] n [U]do[/U] [INDENT][U]for[/U] j<-1 [U]to[/U] n^2 [U]do[/U][/INDENT] [INDENT][INDENT]write(i*j)[/INDENT][/INDENT] [INDENT][U]end-for[/U][/INDENT] [U]end-for[/U] | |
Hello! I've started programming C++ a week ago, so I cannot solve my problems easily. I've started a small project for learning classes, it's about encryption and stuff. I don't really get pointers, although I've read some about them. My problem is that when I use the cipher, it replaces … | |
“Although for consistent and reusable design we follow Object Oriented paradigms; “structured approach” has still its worth in some imperative and critical applications. Support or contradict this statement with solid arguments. | |
In the code below, I check if test.dll has been loaded, and it always returns false... I can't figure out what I'm doing wrong. Can anyone give me a hand? P.S.: I've triple checked that the DLL is in the running directory. [code=c++]#include <iostream> #include <windows.h> typedef int (*AddFunc)(int,int); typedef … | |
Hiya. Many apologies if the question I am about to ask has already been answered. I searched the forum, and found a couple of threads that seemed to be relevant to my problem, but none seemed to describe the problem fully. I'm fairly new to C++, having only been using … | |
Hi! I've been searching for reading number in a string containing mix of number and char for hours, but I've found the right code. The string has the format q23 - q3 (or q23-q3) I'd like to read the number '23' and store it in x, '3' --> y, and … | |
I am currently having somewhat of a brain stump here. I am programming in a larger project and well, it's on the move to c++. the source code is all c we compile by using a makefile. There is a file with several functions we are taking one removing everything … | |
I wrote some C++ programs and classes a few years ago using Visual C++ 6.0 as my editor/compiler. Recently I replaced the 6.0 with Visual C++ 2008 Express. Now, none of my older code will compile. I read that there were some changes to the C++ standard library some time … | |
Hello guys, that's my first post around here and I have a problem with binary files. I'm writing a simple editor for my arkanoid clone game. This editor opens a binary file defined by this: 0-26 byte: Descriptor for the file. Once in each file. 27->(1141*n): Levels inside the file, … | |
Hi I am trying to implement a sequence using a linked list. I need to have the following functionalities: insert, remove and concatenate. The concatenate should not be destructive and the function call should be like. That is Seq1 and Seq2 should be preserved post function call. [code=c++] Seq3 = … | |
plz chk my code i m having error at line 35 and 36[CODE]#include <iostream> #include <cstring> using namespace std; class strng { char s[30]; public: strng() { strcpy(s,""); } string getstring() { cout<<"enter the sting:"; cin>>s; return s; } void displaystring() { cout <<"the string is:"<<s<<endl; } const strng &operator+= … | |
hey guys.. greetings to all please help me regarding my problem i want to find how many times a digit has occurred in a number. for example i have an array which consists of numbers 1011 1022 1033 number of 1's= 5 number of 2's= 2 number of 3's= 2 … | |
When I compile my code, I get these errors: [code] ------ Build started: Project: engine, Configuration: Debug Win32 ------ Compiling... baseanimating.cpp c:\program files\microsoft visual studio 9.0\vc\include\time.h(39) : error C2143: syntax error : missing ';' before 'string' c:\program files\microsoft visual studio 9.0\vc\include\time.h(39) : error C2059: syntax error : 'string' c:\program files\microsoft … | |
I have recently installed Code:Blocks 8.02 for Windows, but I have a problem with my debugger. Every time I try to debug I get an error that says I haven't set my debugger executable yet. I selected the mingw c++ compiler included in the install, and set the debugger exe … | |
hi as i finished my I sem of computer applications at SGRRITS coll in dehradun ,india in second sem C++ is part of my course. now i want to know about the main difference between c and c++ how c++ is more use ful and its features with the help … |
The End.