51,593 Topics
![]() | |
Hello all! I'm having trouble with my homework assignment - I've been working on it for hours and have gotten it down to one syntax error and then I think it will compile so I can move on, I just can't seem to figure out what the problem is. Here … | |
Broken from [URL="http://www.daniweb.com/techtalkforums/thread59118.html"]here[/URL]. I Have quite the same probem . But I'm block at this point : [CODE=c] #include<iostream> using std::cout; using std::endl; unsignedint uiStringSize = 0; /* prototype fct encrypt */ void encrypt( char * ); /* prototype fct decrypt */ void decrypt( char * ); char i=0 ; … | |
I just started messing around with classes and have been trying to figure out this error for an hour or so. Here is the compiler error: [code] g++ player.cpp tictactoe.cpp TicTacToe.h:15: error: expected constructor, destructor, or type conversion before ';' token player.cpp:26: error: 'TicTacToe' has not been declared player.cpp: In … | |
Hello everyone,I am Mozira and live in South Africa.I am currently doing visual C++ for the first time using Borland C++ builder.So i would gladly appreciate it if you could help and guide me with tutorials about visual C++.hope to hear from you soon | |
If NOT_WORKING is defined, the following program gives me linker errors: /usr/bin/ld: Undefined symbols: Definer<int, 1>::d Definer<int, 2>::d Definer<int, 3>::d Definer<int, 4>::d collect2: ld returned 1 exit status But if NOT_WORKING is not defined it compiles and runs. I can't figure out: 1) Why those things are not getting instanciated. … | |
Hello: I am seeking a few tips in regards to debugging: I have been using [B]Visual C++ 2005 Express Edition[/B] for the last few months but am not very comfortable with its debugging platform. I simply wish to step through a section of the program via breakpoints and view variable … | |
Hi, I need to write a counter code to count the number of spikes in the TTL logic input signal... What should I take as an input... Can i write it normally by putting the count in an infinite loop like while(1) // increment count exit(1) something like this... or … | |
i'm trying to write a program that takes two numbers from the user prints out the sequence between the 2 numbers and then outputs wthe longest sequence for example if the user inputed 8 and 10 it should out put 8 4 2 1 9 28 14 7 22 11 … | |
The [] operator must be a non-static member function. I have been able to write a class and overload the [] operator. But in my weird case, I would like to have an array of elements:[CODE]MyClass elements[6];[/CODE]But I don't actually want element access[CODE]element[2][/CODE]to use regular pointer arithmetic; rather I'd like … | |
Hello: I am having a bit of problem with logic in a segment (marked in [B][COLOR="Blue"]blue[/COLOR][/B]) of this code: the indicated code should simply update the variable upon each pass of the function as it runs; the variable value maxes out at 456-- it will not increase by 228 beyond … | |
hi, sorry if this is a stupid question, i am a total newbie:) i want to dynamically allocate an object to a pointer and i write: [code=c++] class_test *ptr = new class_test(); [/code] [code=c++] class_test *ptr = new class_test; [/code] both of them compile:confused:....are they the same thing{meaning that the … | |
Hi, i would like to separate the declaration of a class from the definition. i know about the [code] void aclass::a_method(){ ..... } [/code] but i dont know anything about what should be written in the header file, and how can i use it through main....:confused: sorry if am not … | |
Hello all, I am writing a Breakout type game in C++ and I've come across a problem. I've drawn the bricks, bat, and a ball to the screen as well as programmed the movement of the bat and ball, however, collision detection is kicking my butt. I've looked up sample … | |
I have the following script of a dialog box: [code] #include "Resources.h" IDD_MAIN DIALOGEX 0,0,500,300 FONT 8,"Tahoma",400,0 STYLE WS_CAPTION|WS_VISIBLE|WS_SYSMENU|WS_GROUP|DS_CENTER EXSTYLE WS_EX_APPWINDOW BEGIN // controls END [/code] [code] ... hDlgMain = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_MAIN), hWndMain, MainDlgProc, (LPARAM)&MyData); ... [/code] The dialog box itself works great, the problem is that it's not propely … | |
[COLOR=#808080]Hi, [/COLOR] [COLOR=#808080]I’ve written a Windows application in Visual Studio .NET using C++. The main window of my application is a dialog window. I need to display a Save File Dialog window when one of the buttons on my main window is clicked. But my main window is a dialog … | |
I need to check what hardware is installed in the computer using C++. Especially I need to check what graphic card, CPU and HDD is present in the machine of user of my program. Thanks in advance Edek | |
Hi , I am developing Library Management Software using Win32 C language. I am using [COLOR=green]Dev c++ 5.0[/COLOR] compiler.. I have to display the Book details in the DataGrid.. I dont know how to add [COLOR=red]Data Grid Control[/COLOR] to Form.. i have searched in lot in the net, but couldnt. … | |
ask Using two integers num1 and mun2 divide the first by the second print out guotient and remainder both ints output looks like this First number entered second number entered Quotient Remainder | |
Hi, I am working with Win32 programming in C language.. I am using Dev C++ compiler 5.0 .. I had created the tab control in the form with the following coding. [COLOR="Red"]g_hwndTabCntrl = CreateWindowEx(0, //more or 'extended' styles WC_TABCONTROL, //the 'class' of window to create NULL, //the window title WS_CHILD|WS_VISIBLE| … | |
I have a C++ program that reads from an infile, determines by a char if the line should be Deleted or Added. From there the program uses pointers to insert data into a sorted list. The issue I am having is printing the data out properly If you notice, I … | |
if i write something like this it works: [code=c++] Person array_persons[10]; int age=0; for(int i=0; i<10; i++) { cout<<"give age : "<<i<<endl; cin>>age; array_persons[i].setAge(age); } [/code] but when i try to do it with pointers: [code=c++] Person *array_persons[10]; int age=0; for(int i=0; i<10; i++) { cout<<"- give age : "<<i<<endl; … | |
I have a question and I was hoping someone could point me in the right direction. I know the IP address of a server I want to download a file from, and I know the path on the client hard disk I want to download it to. How could I … | |
hey guys heres a pop machine program ive been working on and i juss cant seem to understand why im gettin errors especially some of the semi colon errors any help would be much appreciated ty in advance [code] [COLOR=#008000]//File: Assignment 3[/COLOR] [COLOR=#008000]//Programmer: Ravi Mandair CPSC 1103 S. 10[/COLOR] [COLOR=#008000]//Purpose: … | |
I am a new learner to the Dao database operation through MFC access.For now I am trying to write a program, saving two values in two edit boxes to a column of MS Access 2000 table. There are not many samples available. Could any one write little sample codes or … | |
I have come to point in my program where I have decided a static variable would be the best option. I am not very familiar with static variable use and have never implemented them often. The area of concern is highlighted in [COLOR=Red]red[/COLOR]: I am simply using a time function: … | |
I am having trouble, i am trying to make a program read in 3 points and calculate the 3 things listed in the program, but i cant seem to get the sideA-C to get calculated out without overloading the sqrt function. The functions given above main have to be used … | |
I'm trying to understand Argument Dependent Lookup. The classic example is: [CODE]namespace NS { class T { }; void f(T); } NS::T parm; int main() { f(parm); // OK: calls NS::f }[/CODE] I'm looking at this [URL="http://www.kuzbass.ru:8086/docs/isocpp/basic.html#basic.lookup.koenig"]page[/URL] and in particular this statement: [QUOTE]If T is a class type, its associated … | |
I have been looking at a small bit of code concerning the use of [B]static [/B]with variables; I thought I understood the use of [B]static[/B], but I find this code confusing: [code]//: C03:Static.cpp // Using a static variable in a function #include <iostream> using namespace std; void func() { static … | |
hi everybody! I am trap in a problem related to structure. I am working in the project in which I am devleoping a DLL in C++ using VC++ editor. The code I am using is as follow: [code=c++] //This is header file typedef struct{ static char szOriginalAddress[0x100]; static char szRecipientAddress[0x100]; … | |
I need some help,Here is the problem, I work for a company that lays ceramic floor tile and I need a program that estimates the number of boxes of tile for a job. A job is estimated by taking the dimensions of each room in feet and inches, and converting … | |
I am incorporating clock_t into a current build; I need a simple way to measure time elapsed; it is not so important the source of elapsed (CPU) time or even its starting point (zero would be ideal, but it should not matter). I really just wish to understand the output … | |
I am trying to compile the following code. I keep getting thefollowing linker errors. I am getting about 28n of these errors all having the linker at the begining [Linker error] undefined reference to `SQLGetDiagField@28' [Linker error] undefined reference to `SQLGetDiagRec@32' [code=c] #include <stdio.h> #include <windows.h> #include <sql.h> #include <sqlext.h> … | |
Hello ladies and gents, Wanted to ask if someone could help me out with the debug settings in VC++ 2005. What I want to be able to do is to follow my program step by step and see what happens with the variables. I know it's related to the settings … | |
string strd1 = "9"; int m=atoi(strd); Got the error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' how to change the second line to make it work? | |
Hi, I want to write a program in perl which will pass function parameters to a C++ .exe file and run the exe file with these parameters | |
Hello, I've put up some posts about the programming tools that I am currently using. So far, no takers. This makes me wonder what people who know what they're doing are using! M$'s IDE seemed overly complex for my modest needs. Besides, I have no use for the DLL and … | |
how to solve this error: error C2664: 'strcpy' : cannot convert parameter 1 from 'class CString' to 'char *' when I am using strcpy(StdGrades.StudentName, this->m_StudentName); StdGrades is a struct, StudentName is a CString type, m_StudentName is a CString variable. Actually it is from: [URL]http://www.functionx.com/visualc/fileprocessing/cppserialization.htm[/URL] there is only one error | |
if I have three words in there lines in a .txt file, and I want to read them to three string, how to do this using c++ ifstream? how to read every line(word)? | |
My recent assignment is to find Mersenne Primes between 2 and 1,000,000. For the first part of my code, I have a function to find out if a number is prime or not. The second part of my program runs a Lucas-Lehmer test to find the Mersenne number. My problems … | |
(** This post was inspired by a recent post I read where a reply suggested the indenting of all code.) I am guilty of this, I'll be honest. I know it is important to indent and indent properly, it is industry standard, and it is simply utilitarian. I always think: … | |
[code]#include <iostream.h> #include <fstream.h> main(int argc, char *argv[]) { //definition of the variables. int mtx1[20][20], mtx2[20][20], mtx3[20][20]; int n, i, j, k; //exit if the number of arguments is not 2. if(argc != 3) { cerr << "Usage: mm <filename1> <filename2>\n"; return 1; } //open the input file 1. exit … | |
Hello, this is my first post on these forums. I'm taking a CPSC 100 course to supplement the science part of my degree, and I've been having a lot of trouble since the midterm, when the profs for the class switched (they have completely different teaching methods). Since then, I've … | |
Quick question, what do i want to put in the while of my do while statement in myprintitle function so that will loop around with the main part as well. [CODE] include<iostream> #include<iomanip> using namespace std; int startDay(int , int ); int calcjan1(int, int ); void printMonth (int , int … | |
Hi everyone. I'm extremely new to this. It's my first programming course, period. I realize I probably needed a load of pre-reqs, but for some reason, I was advised to take Intro to C++ so... So far, I've been doing well! However, this latest project has me stumped... The jist … | |
I am once again getting confused with functions and arrays in C++. I am trying to write a program that collects three values from a user, then displays those and does various things with them. In short, what's the problem with this line of code right here? [code] player = … | |
Hi Greeting to all I want to build a USB driver for windows98. But I do not know how to build a device driver in windows. My targeted language is C/C++. So I need help to know how can I build a device driver for windows. As well as I … | |
Greetings: A simple question that has me stuck: Program runs, calls function, function runs... Return to Main? This last area is where it fails. No errors, just no control returned to Main.cpp at end of function run. I've been studying the code much and researching the solution on the Net … | |
can anyone tell me how to fix this, it needs to print out the calendar for a whole year. [CODE]#include<iostream> #include<iomanip> int startDay(int year, int calcjan1); int calcjan1(int year); void printMonth (int startDay, int days); int main() { char again; int year=0; do { cout<<"Enter a year for a calendar … | |
I am using C++ in VC++ 2003 there are some examples like this [URL]http://www.codeproject.com/cpp/miniexcel.asp[/URL] but I don't quite understand. I hope someone could help me or guide me to some related documents, bow! | |
I have been trying to store the values of card face value into an array called faceValue but I don't know how to do this. I've created the array and placed in public in my h.file (char faceValue[5];) but trying to link it to *face in the function deal is … |
The End.