51,593 Topics
![]() | |
[QUOTE=tatumkay;313662]just started c++ class.... we use the absolute c++ book after starting to read this book i decided to buy c++ for dummies and borrowed a book titled object oriented programming with c++ (book is from india written in english) i still have no idea where to start on these … | |
I am writing to a file the ios fixed and show point works fine through out the loop but ios left only works on my file from the second set of data on. The first set of data still stays shifted right. Here is the code, thanks in advance. [CODE]void … | |
To all the c++ experts, I have some doubt on how does the convertion works. If for instance, I want to convert a hexadecimal eg. 199 to to decimal, I use printf("%d",199); but what if I want the hexadecimal 199 to be displayed in binary? What must is use? | |
I am having a problem compiling my code. The following error is displayed: make mpixlcxx -c -O3 potentialqueue_local.cpp mpixlcxx -c -O3 eventqueue.cpp "eventqueue_remote.h", line 20.36: 1540-0063 (S) The text "eventqueue_t" is unexpected. make: *** [eventqueue.o] Error 1 I am fairly new to C++ and not sure if the problem is … | |
I am trying to add a user password protection to my program but it does not work it will quit if password is right or wrong. The file name "setpCS4.dll" is the file the password will be stored in. Thanks for your help. | |
I haven't ever used CLA so I had to ask. For simplicity sake, Say I have a program that takes in at most 5 arguments. The arguments from args[1] - args[4] has to be some numbers. These number will be used for something, say to calculate its average. How could … | |
Hi, I don't know why the member variable of my class is getting a wrong value. I just want to copy a char array to member variable that is also a char array. What is wrong? Thanks! [CODE]// constructor filewatcher::filewatcher(char filename[]) { // filename to watch strcpy(this->_filename, filename); }[/CODE] | |
so here the thing im practicing c++ just started all this is in cmd :P and im making combat simulator as of a project on another forum that i guesed good practice so im doing it but i decided to make 3 classes :archer , mage , barb and i … | |
Is there any way to convert String s = "1234" to int s[4] = {1,2,3,4}? and how can i check if it does not contain any non-numeric characters? thanks=) | |
. . . . . . . Hi, I am as they say a beginner I need to create a pointer to a linked list as a member variable. I have to tried todo this a number of ways but i dont think i understand the terminology. i have a … | |
Hello, To start thanks in advance for any help. Now I will note this question is about homework so I just want help to get started not everything laid out for me. Ok here is the deal. I have a class called StudentArrayV4, it is a dynamic array of pointers. … | |
This is suppose to be a simple selection sort but I think I'm missing something because my output isn't completed sorted right. [CODE]void SelectionSort(data list[], int length) { int index; int smallestIndex; int minIndex; data temp; for( index = 0; index < length; index++) { smallestIndex = index; for(minIndex = … | |
Hi there... Can anyone please help me by explaining me the Gauss Elimination code and how each of them function? I really have no idea how to do it... | |
Hello. I have been working on a program that deals with array of structures. In this function, category report, i'm taking my structure and reading it through the a loop. Specifically, i'm reading category and price. In that loop there's a loop for the five categories. Basically, when it finds … | |
Hello, I am new the the C++ scene and to this website. Can someone assist in Pseudocode for take-home pay? Thank you. | |
Hi all, I am trying to use some APIs found in dwmapi.dll (like DwmExtendFrameIntoClientArea), but I have some problems. If I include dwmapi.lib in the dll include list, the the app works fine on Vista, but doesn't want to run on XP since dwmapi.dll is obviously missing. I tried the … | |
I would like to learn more about how desktop applications are put together. There are many books out there that give specific code examples for small problems such as connecting to a DB or creating a dialog box etc and there are design pattern books that layout abstract concepts but … | |
What's the difference between (aside from syntax I mean): a) typedef struct MyStruct{....}; b) typedef struct{...}MyStruct; I saw this example in "Thinking in C++", but there's no real explanation as to if they're exactly the same or if there's some real difference in them. | |
hey guys, I have the assignment to build a program to decode a cryptogram puzzle using provided word tables. for each table the program should print the decoded text generated by that table and the number of actual english words in the decoded text. the encoded text is in the … | |
I have this code: [icode] #include <unistd.h> #include <iostream> #include <string> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; void add(char todo[], string priority, string home){ FILE *file; file = fopen(home.c_str(), "a"); fprintf(file, "%-50s| %-6s\n", todo, priority.c_str()); fclose(file); } void list(string home){ string line; fstream file(home.c_str(),ios::in); int … | |
The IT firm ITEnterprizes has a unique way of deciding whether an applicant for a post should be invited for an interview or not. The decision depends on the candidate’s qualifications, age and years of experience and is made as follows: a certain weight is assigned to each of these … | |
The meaning of parallel is not that of parallel processing. I simply mean that if algorithms A and B are represented by the two sequence of operations (a_1, a_2, ...) and (b_1, b_2, ...), then the executed sequence of operations is (a_1, b_1, a_2, b_2, ...). It is not compulsory … | |
Hello, At this times i need to decide something that will chage my life forever, it is: Continue with C++ and the possibility to compile my programs at my HP Jornada 720(Handheld PC) and in my [b]PC only and NOT for my j720[/b], or learn C and start my mobile … | |
Hi Any reason why my votes aren't adding up once the program has run? [CODE]#include <iostream> using namespace std; int main ( ) { const int NR_SESSIONS = 3; int nrAttend; int votesForS, votesForR, votesForO; char vote; // Initialise totals votesForS = 0; votesForR = 0; votesForO = 0; // … | |
Hi, Just wonder if there is any way to get this information while compiling your source code, what I mean is if I can do something like this: [code=c++] //pseudo code if (IDE == BORLAND) cerr << "You are using: " << _COMPILER << endl; if (IDE == VISUAL_STUDIO) cerr … | |
This would be trivial but it comes with a serious catch - I can't edit the Unrelated or Friend class. I can't seem to access a private data member despite the friend relationship between the classes. Code: [url]http://pastie.org/613042[/url] [code=c] class UnrelatedClass { ... private: friend class FriendClass; float m_fNumber; } … | |
Hello all, I want to start using openCV, but I've noticed that some elements in GUI are missing (TextBox, Label etc.). I was wondering where to look for those missing elements (assuming openCV does not supply them), and whether I can integrate them to openCV, since it'll make my life … | |
Hello everyone, Hope you are fine. Actually, I am going to implement a network program for my final year project and i am a bit confuse on the methodology to use. I have already reviewed extreme programming, v-model and agile but still can't find the right one. I have approximately … | |
hi, i get an error - 'incompatible types in assignment' for the following code [CODE] #include<stdio.h> int main() { char name[10]; name="Hello"; printf("%s",name); } [/CODE] Any help will be greatly appreciated... | |
Can someone tell me a way to get the PID (Process ID) of a process from its name? thanks.. | |
Hi everyone, I have an [U]extremely complex topic[/U] to discuss/ask about. I'm hoping what I have already done is the WRONG way to do it, so that I can implement a more simplistic approach to this issue. To start, here is some background information on my project. I want to … | |
I have a general question about threads prompted by something strange I'm seeing in an application I developed involving ODBC access to Microsoft Access and SQL Server databases. Let me present the context of the problem first. I have been developing some tutorials on ODBC database access in two different … | |
Well, I believe the answer/problem is in these few lines: [code] SDL_Surface* thing; SDL_LockSurface(thing); put_pixel32(thing,2,2,SDLred); SDL_UnlockSurface(thing); apply_surface(0,0,thing,screen); SDL_Flip(screen); [/code] The locking/unlocking dosn't seem to do much, if I delete the lines the same thing happens, and if I check if it must lock before, the program still returns 3, etc. | |
Hai, I'm a higher secondary student in kerala. As our project I have to create a simple car racing program in c++. I implemented the following code fragment. May I get some instructions to improve it? Especially the method of accessing input to controll movement of object? [code=c++]#include<iostream.h> #include<conio.h> #include<dos.h> … | |
Hi, I've been working on this project I'm doing and its killing me because I can't figure why my array\formula's don't want to get along. Here is the general overview of what the project requires: Here the project: Operation • The user enters a score and clicks the Add button … | |
i am currently starting on a project that requires to load a flash movie from a remote website (which keeps track of the user authentication) and edit the variables inside them. in other words, something like a flash game bot. i have figured out how to embed the flash swf … | |
how can I use a function inside an object? (the code is too long to put here but here's a replica) [code=c++] class example { public: example(); ~example(); void doSomthing() { afunction(); } } void afunction() { //do more things } [/code] in this example i wouldnt [B][U]NEED[/U][/B] to use … | |
hi, in this code: [CODE]#include "stdafx.h" #include <iostream> int main() { using namespace std; cout << "Enter a value: "; double dX; cin >> dX; cout << "Enter a second value: "; double dY; cin >> dY; cout << "Enter one of the following: +, -, *, or /"; char … | |
Question1 : how to use c++ to read/write excel file without changing it into CSV file? Question2 : How to use CSV parser in c++? Are there any examples? | |
I am writing a method that does insertion into a doubly linked list and I was looking for some assistance with my code to see if I was heading in the write direction and what needs to be fixed to make this work. [B]Instructions[/B] template <class T> Iterator<T> List<T>::insert(Iterator<T> pos, … | |
For some reason I am having trouble with just returning the address of the data field being pointed to by the node pointer. [code=cplusplus] template <class T> T* Iterator<T>::operator->() const { return *nodePtr->data; } [/code] | |
Hi, as per the requirement i was asked to create a code that fetches each line under a particular section of a text file and store it in a variable. [code]#include <iostream> #include <fstream> #include <string.h> using namespace std; int main() { ifstream ifs("catter.txt"); string line; char name[100]; char cat[100]="mkdir"; … | |
Hi there all, Could anybody please help me, as to why my program is not adding the right quantity's? [CODE]// Question 2a #include <iostream> using namespace std; int main ( ) { const int NR_SESSIONS = 3; int nrAttend; int votesForS, votesForR, votesForO; char vote; // Initialise totals votesForS = … | |
can someone give me some xsample of inventory program in turbo c++ using stdio conio switch/ case with addition and multiplication like in the grocery cashier computer XD:D | |
I've always been a little confused with this stuff... I found snippet of code and understand what all of it is doing until this line... Seems overly obfuscated... [code=c] int tmp = 0xff000000 | ((int)(val) << 16 | (int)(val ) << 8 | (int)(val)); [/code] | |
| |
This is an example of how to turn numbers into words. 1473 would get translated to "one thousand four hundred seventy three", for example. The class has a simple interface and can handle any value representable by unsigned int. The implementation recursively processes groups of 3 digits using table lookups … | |
I get a variable that is a int and a pointer (address) to a string (Byte*) in c++ I've been struggling like for 3 days in order to turn this into a Byte array. I have no clue how long would be that string so I know I'll have to … | |
Hello everyone, I have installed Dev-C++ IDE on my system to run POSIX threads application. The program has compiled correctly. When I try to run the application, I am encountered with the following error Unable to locate component This application has failed to start because pthreadGC2.dll was not found. Re-installing … |
The End.