51,592 Topics
![]() | |
Hi, I was thinking of writing simple Code editor pad like GEdit or Notepad++ but only for PHP and SQL. Now it is for hobby, so I want to use scintilla on wxWidgets and avoid wxWidgets component (purposely). So I was asking what are steps to write such pad. Also … | |
Hello. What i'm trying to do is simple and I know that I could just get the answer offline. However, I wanted to finish this one myself, so if someone could fix what I believe to be a small error I would appreciate it. I am simply trying to read … | |
Hi friends, I dunno how to declare global array. Its funny because, it works if declared locally. my code looks like that [CODE]private: /// <summary> /// Required designer variable. array<String^>^ salka = gcnew array<String^>(20); // GIVES ME ERROR System::String^ date; System::String^ linia; System::Int32^ token; System::Int32^ i; System::Int32^ j; System::Int32^ k; … | |
Suppose your $1,000 is earning interest at 4% per year. How many years you need to double your money? Write a program to calculate the number of years! | |
Hi, I need to create a program to do a threaded merge sort (kinda), but in the meantime I am trying to pass a struct through the the Merge method (thread runs this method), but I keep getting seg faults. I am sure its something obvious, please help me out. … | |
I made a header file to convert strings to numbers of base X. That is I want: [CODE]int num=B<16,int>("FFF");[/CODE] To equal: [CODE]int num=0xFFF;[/CODE] Here is the code so far: [CODE]#include <string> int numb(char in) { if (in>='0'&&in<='9') return in-'0'; else if (in>='a'&&in<='z') return in-'a'; else if (in>='A'&&in<='Z') return in-'A'; } … | |
Hi, I have to make a Tic Tae Toe game using Classes but I have no idea how to even start. I set 3x3 2 dimentional array as private member variable. What should be public variables? Here is the instruction i was given: 1. The game board will be created … | |
Finally , ı finished my simple program. I will learn very very much thing from you And ı will ask many many questions after this time:) So I will wait your suggestions about my program [ICODE] #include <iostream> using namespace std; void encyrpt(void); // Encyrpt function prototype void decyrpt(void); // … | |
Hi gang ; The code below works fine but a more flexible one would be better. For example what am looking for an original try-throw-cath block which throws the exception "Item not found" message itself. try { SQLiteConnection ^connection = gcnew SQLiteConnection(); connection->ConnectionString = "Data Source = atbdn3.db3"; connection->Open(); System::String … | |
hello everyone, I have a problem with netbeans 6.8 (c/c++) when I compile a code because dorun.sh give me this screenshot and I could not fix this. the screenshot is the next: [url]http://img848.imageshack.us/i/dibujoyd.png/[/url] thanks for your help, | |
The exercise tells me to find the error in this code [CODE] int g() { cout << "Inside function g" << endl; int h() { cout << "Inside function h" << endl; } } [/CODE] The listed error is that function h should not be defined inside of function g. … | |
Good Morning, I'm having this error in the program " object in abstract class orderedArrayListType is not allowed. Here is the code: arrayListType.h [CODE]#ifndef H_arrayListType #define H_arrayListType class arrayListType { public: bool isEmpty() const; //Function to determine whether the list is empty //Postcondition: Returns true if the list is empty; … | |
I am making an expression tree for a school assignment and am getting these error in my code. Being quite new to C++ I have searched the web for answers to no avail.[CODE]#include<iostream> using namespace std; #include "expression.h" namespace Student { void writeNode(NodeType* node); /* Displays an arithmetic expression. @pre … | |
I found an old post (2002) on another website where someone asked how to colorize text in Linux. The reply was: [CODE]printf ("\033[31ma\033[32mb\n");[/CODE] Where the format is "\033[XXm" followed by the text to be colored. I tried this on my Ubunutu machine and it works. It even works with "cout … | |
I want to make a Application using MFC Visual Studio 2008 to make the dialog transparent besides the controls. I have uploaded the pic of a sample app (just made it for fun) [My Prog.jpg] (1st pic) Second pic is the kind of App I want (I used Photoshop to … | |
![]() | Hi,can anyone tell me how to check if a file exists,I am using turbo c++ 3.0 Thank you for your time. ![]() |
What is [B]IplImage [/B]in OpenCV? Can you just explain what is meant by it as a type? And, when should we use it? Thanks. | |
Hi, I got lost with some prj, hope you can give a hand. I need to create a tiny code, that generating between several variables, with loop that generate all char variations in new row. The order of all variables need to remain as it is, and to take effect … | |
As you know that symbian OS is based on C++ I need a c++ compiler software to run cpp files on my Nokia 5800.I've heard of some softwares but cant find them. Please help me. Thanks | |
Hi, i would like to send data from a C++ application to a php script i am creating that will then put it into a mysql database after manipuating it a bit. If you don't get what i mean then think of it like this. An HTML form can be … | |
HI friends, Is there a possibility to refer to item by its number (in Combobox)? For example, I read all combobox items from a file. and I need to do sth like that: [CODE]if (comboBox1->Itemnumber=1) then {Action}[/CODE] I don't want to refer to the text in the combobox to make … | |
[CODE]#include <iostream> #include <cstring> using namespace std; class Cow { char name[20]; char * hobby; double weight; public: Cow() { strcpy(name,"peter"); strcpy(hobby,"nothing"); weight = 1.0; } Cow(const char * nm, const char * ho, double wt) { int len = strlen(ho); strncpy(name,nm,19); name[19] = '\0'; hobby = new char[len + … | |
Need a standard fifo algorithm. for a cpu shceduler so one command comes in at a time. Please help Thank yOu | |
Hi all, I'm developing a program and I want a way to print out French characters. When I post the French characters in the menu, like this [code] AppendMenu(hSubMenu, MF_STRING, NEW_LIST, L"ç"); [/code] The ""ç" shows with no problem. But I wanna make it to show either in an editable … | |
Hello everyone. I'm coming to you again because you all seem to be much more on the spot answering my questions than my professor. The long story short, we are being introduced to structs in my c++ class, and for the first assignment we are to do a simple Student … | |
Please figure out the error in the code and how to correct it ? Actually i want to use a 2d dynamic array. # include <iostream> using namespace std; int main() { int number_of_rows = 0; int number_of_cols = 0; int a=0; cout<<"Please enter the no. of rows : "; … | |
Hello all, I'm trying to write a binary to decimal conversion program. I'm stuck at the very beginning here because I can't figure out how to allow the user to input the entire binary string while allowing me to break it apart and process it.. I've tried [CODE] int BinInput[*]; … | |
i badly need a hand on this. i have an assignment on my subject, it says that i have to put an MP3 on my C++, so how is it possible?? | |
All was good and properly aligned until I changed the variable type from int to double for GrossPay, GrP and totGrP. After the Hours column (from Gross Pay on), in all the rows where there are fewer digits, the Gross Pay, Tax, and Net Pay columns are left aligned, totally … | |
Hello everyone. I'm a bit new to c++. I'm trying to write a game loop (see the code below) and I'm getting some weird behavior with the GetSystemTime(). I ran through it with the debugger and I get things like this: startTime = 452 endTime = 210 And nothing seems … | |
So I need to program a code which will display the values of all my objects which currently are "Monday and Tuesday." I am getting two errors under my printDay function. Error c2275 'DayOFTheWeek': illegal use of this type as an expression Error c2228: left of '.printDay' must have class/struct/union … | |
hello guys.... I have time in char[] format but I need to convert it to CString. Here is what I have but it does not work [CODE] GetSystemTime(&t); char time[60] = ""; char y[20],mon[20],d[20],h[20],min[20],s[20]; sprintf(y, "%d", t.wYear); sprintf(d, "%d", t.wDay); sprintf(mon, "%d", t.wMonth); sprintf(h, "%d", t.wHour+5); sprintf(min, "%d", t.wMinute); sprintf(s, … | |
My book asked me to create a simple version of a list that held strings. Here's what I did. [CODE]class String_list{ public: typedef std::string* iterator; typedef std::string* const_iterator; typedef size_t size_type; String_list(){ data = limit = 0; }; String_list(size_type, std::string); size_type size() const{return limit - data;}; bool empty() {return data … | |
I am making a program to calculate the distance between 2 location by inputting the latitude and longitude of the locations using DMS, then convert the given DMS to angular measurement. I have made the program using functions but when it finally calculate for the distance, it always goes to … | |
Hello friends, I need some help with my c++ hangman code.The code is below. [code] /*Game of Hangman Author - Chirag Mittal */ #include<iostream.h> // For input/output #include<fstream.h> // For file input/output #include<string.h> // For strcpy #include<time.h> // For time #include<stdlib.h> #include<ctype.h> //for toupper & tolower #define MAX_WORD_SIZE 15 // … | |
Hello, I am need of urgent help.I've made a program to generate bills (using goto statements) but my teacher has asked me to remove those and use something else in place of it.The problem is that I have tried using separate functions for that (It's not working properly) and I'm … | |
Still learning in programming and this problem is course related. Although I am not asking for the answer I would appreciate some help and if anyone can point out what I might be doing wrong that would be awesome. I was able to find other articles addressing the matter although … | |
Hello! I want to split a mathematical expression 3 + 4 ( 5 * 8 ) into tokens by using space as a splitting mode. e.g 3 + 4 ( 5 and so on. But when I write string exp; char space[]=" "; result=strtok(exp,space); the compiler gives the error at … | |
![]() | I am troubled by my very long code for a movie reservation program. A friend of mine told me that I can shorten my very long code using functions. What made my code very long is the switch statement that I used which is composed of 200 cases. Sorry because … |
Hello, I have decided to make a timer program on my computer to limit the amount of time that I game. Anyways, I have it working fine with a small borderless window in the top left of the screen that ticks down and when it gets to 0 it sounds … | |
so the user enters a string of coordinates like "(1,2) (3,4) (5,6) etc..." and I'm trying to use istringstream to pull out each number and put it into an integer value. This is what I've got so far: [CODE] string S1, temp; int num1=0, tempX, tempY; cin.ignore(15,'\n'); getline(cin,S1); num1=S1.find("("); S1.erase(S1.begin(),S1.begin()+num1+1); … | |
The exception is: Unhandled exception at 0x6474f269 in Loliboll.exe: 0xC0000005: Access violation reading location 0x0000000c. I think it's a memory leak. I tried to solve it obviously, but to no prevail. This is the code: [CODE]#include "stdafx.h" using namespace std; int main() { // FreeConsole(); int a; // INTRO = … | |
I am supposed to make a palindrome program using stacks, but my function keeps returning false. Here's the code: Main: [CODE]int main() { char word[50]; cin >> word; cout << strlen(word); if (checkIfPalindrome(word) == true) { cout << endl << "Is a palindrome."; } else { cout << endl << … | |
Hi, I'm currently designing a software application for teaching, it will have a large backend database, short animation videos(basic 2d of people talkin). I'm just looking for some advice in what is the best language to code this type of project in. I have done several projects in both java … | |
Problem I am experiencing: When I compile my code, I get these two error codes: 1) In file included from C:\Users\PaulWilliams\Desktop\CSci Work\C++ Programming\TestScores.cpp 2) unterminated #ifndef I am not understanding what I did wrong, I have done all of my header files the same way and never had this problem. … | |
Hi there, I am fairly new to C++ and wanted to have a go at coding my own function with parameters. However some of the parameters are arrays and I get strange errors occur. I will comment my code with a couple of other questions as well. I am writing … | |
Hi all, my nick name is uhangkincai, 5 years symbian developer for mobile application with symbian native (symbian c++). i join this forum to get new knowledge and also to find any project about symbian c++. thanks and regards, | |
hello, i am a newbie who doesn't have any programming experience. i heard that python is great to start with, but i prefer to begin with c++ because it's known as the best for game programming. 1) is it okay to learn c++ for a newbie? 2) is c++ really … |
The End.