49,764 Topics
![]() | |
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 … | |
Input a list of positive numbers, terminated by 0, into an array Numbers. Then, display the array and the largest and smallest number in it. Process, Input, Output information with variable names and type and complete pseudo code of the program (with declaration of variables, calling of modules, any modules, … | |
pdcurses works well with code::blocks but is there any way to use pdcurses with visual Studio, plz help. | |
Hi , i got an application API interface written in C++. i wanted to inherit the interface in C#. can somebody be kind to teach me how may i write this code in C#? [CODE]HRESULT _stdcall ExampleFunction() [/CODE] thanks! | |
I've been reading sites that talk about clock() but I don't really get an answer by doing that. I mean, I still need to confirm and know some more stuff. I hope you could help me... Here's what i would like to know: 1] what does the value returned by … | |
So i suppose to do some Matrix calculator and perform some calculation by using classes. But we need to copy the square matrixes to other matrix to perform the calculation without changing the actual value. So we can use the same matrix and just changing the form to upper or … | |
when i run my code, i get lots of undefined class errors, even though i have defined and included the files properly(i think). here are the errors i'm getting: ------ Build started: Project: engine, Configuration: Debug Win32 ------ Compiling... baseentity.cpp c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\globals.h(13) : error C2079: 'CGlobals::controller' … | |
Hi there, I am trying to get my head around this simple program, but there are things that really don't make sense... here's the program: [CODE]// Fig. 3.5: fig03_05.cpp // Define class GradeBook that contains a courseName data member // and member functions to set and get its value; // … | |
Hello. I'm writing a manager class that should handle a vast and expandable group of classes. The manager class uses a hash_map to store all these etherogenous objects. The objects are all derivations of a base class Object, and of different "interface" classes which are used to define required functions. … | |
plz guide me i m having some error at line 28[CODE]#include <iostream> using namespace std; class str { char s[30]; public: str() { strcpy(s,""); } string getstring() { cout<<"enter the sting:"; cin>>s; return s; } void displaystring() { cout <<"the string is:"<<s<<endl; } string operator+= (string &t) { strcat(s,s.t); return … | |
I have read a lot of topics with these subject many of theme where on these forum but what ever i try i cant get this working. I have tried 4 or 5 function for converting string to float but i always get compiler error left from xxx must be … | |
If you have a form application and open another form from a buttoncontrol on "Form1", this will open another form but this form will also be in the "Taskbar" on your desktop. So you have 2 forms in the "Taskbar" (What I am after is to still only have one … | |
[CODE] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () { srand (time(0)); int count = 0; int random_num = (rand () % 100) + 1; int high_num = random_num; int low_num = random_num; float total = 0.0; while (count < 100000){ count++; random_num = (rand () … | |
Can a variable declared as public be used in the main function? | |
Hi! I am quite an active programmer. I work allot for school so i need a good IDE. I a[COLOR="red"][/COLOR]m currently working on Windows with Dev C++. Dev is quite a good compiler and editor but IMO the debugger...sucks. So I would like to know your opinion on Dev, and … | |
Hello, I'm not much of a programmer and will probably never be, but am just curious. Can I initialize a pointer with a constant value different than NULL? I.e. can I tell my pointer to point at one particular memory cell? It's a number so why couldn't I? I know … | |
Hello. Can someone tell me what will happen if i have an array Ar[5][5] and a pointer ptr = Ar[0][0] and try accessing the second line of Ar throught ptr by increasing it by 5? I mean ptr+5 ==Ar[1][5] or something else? | |
I am making a scientific calculator as an assignment in my class. I am using switch case for all the operators like +-*/ , and I am calling them with a single keyword like '+' for addition and so on. The problem is that when i try to use more … | |
Hey guys, I'm new here. And I was wondering if you could help me with a question i have. You see i have to write a C++ program that plays the game of tic-tac-toe. And the class contains as private data a 3-by-3 double subscripted array of integers. And i … | |
I am trying to declare a Doublebuffered panel in C++ I can only find the declaration for this in C#. So I wonder how this could be converted to C++ ? [code] public class DoubleBufferPanel : Panel { public DoubleBufferPanel() { // Set the value of the double-buffering style bits … | |
I am trying to create an expression evaluator to expand my C++ knowledge. It is supposed to evaluate 5(x+7)-2. Here is the code: [code=c] #include <iostream> #include <stdio.h> #include <time.h> using namespace std; time_t now, later; void sleep(int delay) { now=time(NULL); later=now+delay; while(now<=later)now=time(NULL); } int main(void){ //It finds an error … | |
hi! I have created a class with 2 constructors and whenever i try to access it i got the error no match for to call int& here is the code [CODE]class A{ public: A(){}; A(int i); int moj_broj; }; A::A(int i):moj_broj(i){} int main() { A something; cout<<"before "<<something.moj_broj<<endl; something(5); cout<<"after … | |
need to change this from availcredit01.cpp to availseats01.cpp and make the necessary adjustments 1)ask user to enter the room size 2)get room size 3)ask user to enter number of students 4)get enrolled 5)set avilseats to room size minus enrolled 6)display the available sets 7)halt and return to operating system i'm … | |
Hey guys I need help with a program for school. It involves a menu to access sub programs and use of recursive techniques as well as 2D arrays and traversing. Here's the requirements: In this program, you are to create a menu-driven program that allows the user to execute one … | |
Hi All, When I try to compile the code below, I get error message " error: ‘MAX_IMG_HEIGHT’ undeclared here (not in a function)". I tried to declare them in different ways but it does not work. Does anyone have idea ? I appreciate for helps, The code is: [CODE]/* ImagExper.h … | |
Hi i'm writing this program where the user chooses whether to print out a square, a forward triangle, and a backwards triangle using the "*" character. I got the square and the backwards triangle to work and the forward triangle, but i cant figure out how to do the back … | |
this message is coming up i cant get it off ERROR C2447 [CODE]#include<iostream> using namespace std; int main(); { int item_purch, numb_of_purch, quit; char ('A' || 'a'), ('B' || 'b'), ('C' || 'c'), ('D' || 'd'); double mugs, teeshirts, pens, tot_mon, curr_cash, mon_spent; cout << "Welcome to the Southern Illinois … | |
I have a problem with flickering for a lot of buttoncontrols in a panel. I have put a panel on the form that holds 200 buttoncontrols. When switching from one panel to this panel, all 200 buttoncontrols flickers for about 2 seconds. I have red that if setting [B]DoubleBuffered = … |
The End.