49,761 Topics
| |
Hello, i'm reviewing the exercise from the book and trying to understand the point. Basically it creates a static array and declares uninitialized char pointer. Then it allocated memory dynamically to the same char pointer. What i don't understand why is the program using strcpy() to copy string into newly … | |
How do I appropriately go about resetting where the pointer is in a file? I was under the impression that I had the correct way, but my code is not properly functioning. I need to do a character count, word count, line count. Which ever function I run first returns … | |
Hey, My code was working great yesterday. I go to submit it and it's got this new error out of nowhere! It is 'class std::vector<long double>' has no member named '_'. It says instantiated from the line [code] vector <LD> matrix; [/code] and then takes me to some code entitled … | |
I am having trouble making this menu, I followed some instructions online but I can't seem to get it to loop back to the menu after I am done with a menu selection. Please Help! [CODE]#include <iostream> #include <string> #include <cmath> using namespace std; int main () { int choice; … | |
So I thought I had an understanding of pointers and references but I'm not sure whats going on with int*& x. Does this mean a reference to a pointer to an int? also what use does this have? | |
Hi all, I write because I am struggling with a very strange thing. I have this class: [CODE] static const long POINTS_VERY_FEW = 100; class Bin2DSphere { /*! Class for 2-dimensional binning on a sphere */ public: string Name; double PhiMin; /* Minimum value of Phi */ double PhiMax; /* … | |
| |
Ok, well I have done some research on this. And I have tried a few different methods, both seem to be giving me the same results, which must mean there is something else going on here that I am not understanding, or its just not working right. EDIT: This piece … | |
I need a program that opens a sample program and counts the number of reserved words, operands and operators. Operands and operators are easy to distinguish. My problem is how do I determine the reserved words there? One solution I thought of is to create a separate text file that … | |
I am trying to make a win32 program which uses an array of data that then gets put on the window. That way I can do my drawing on the array and then bitblt it or something to the screen. How would I do this. Also how many bytes of … | |
Hi, I want to send chains of 12 bits of data through USB, but I'm completely new to USB programming. Say I type in "A", and it'll send 000000000001 or something like that. Basically, I'm wondering how you tell the USB port to send a 0 or a 1 in … | |
Hey there Geeks! Sorry if I'm posting this in the wrong place, it is about a .cpp file but it isn't about C++, it's about the text file. I was doing my graphics programming assignment with directx and it was somewhere around 80% done and suddenly I made a wrong … | |
A C++ newbie question: I found the following function: [CODE]int &min(int &x, int &y) { return x < y ? x : y; }[/CODE] I am confused of the usage of “&”. Is that possible to re-write the above function as [CODE]int &min(int x, int y) { return x < … | |
Im currently in the need of some code metrics. Specifically Im in need of afferent + efferent coupling and Instability measures. I used to work with NDepend (on .NET platform) but I now need to be able to make similar measurements on a c++ project. If you don't know NDependt, … | |
Dear Sir, I am trying to print the string with the following code, but I am getting errors like Undefined symbol 'string' Undefined symbol 'str'. [CODE]#include<conio.h> #include<string.h> #include<iostream.h> void main() { string str = "My name is shridhar"; cout<<"What is your name"<<str; getch(); } [/CODE] I think the problem is … | |
hello guys... I have been trying hard to connect to SQL Server using MFC but could not do that. No proper examples I could found. I know this can be done using ADO (ActiveX Data Object with COM) but have been unable to do that. Please can anyone of you … | |
I have a CSV with a large number of rows and 7 columns. I get the data from another source and it is labeled as say Column 1 is first name, 2 is last, 3 is age, 4 is gender, 5 is city. I need to be able to scan … | |
Hello all: I have read that the purpose of const member functions is to specify which functions may be used on const objects. This makes sense. An example is given in my text and I don't understand it. If anyone could help, I would be very grateful. Here is the … | |
hi I need help with this problem. I have tried writting the program, i just can not get it to run properly. Please Write The Fibonacci series 0, 1, 1, 2, 3, 5, 8, 13, 21, ... begins with the terms 0 and 1 and has the property that each … | |
Sorry if I'm posting this in the wrong place, it is about a .cpp file but it isn't about C++, it's about the text file. I was doing my graphics programming assignment with directx and it was somewhere around 80% done and suddenly I made a wrong turn with a … | |
Hi guys and girls, I've decided to pick up C++ again after not using it for 2 nearly 3 years. I've been programming in java and c# in the mean time so my understanding of programming is very good. I've been trying to make a pack of cards but for … | |
Hello... I've been trying to learn about audio sampling in C++ for past few days. What I learnt was that computer converts analog signal (of sound) and converts it to digital discreet signals and unit called a sample. Also there may be around 40,000 samples taken in a second. My … | |
Hi there,i have to create a program that shows the symbolic derivative of a polynomial function, and my teacher told that it is all about string manipulation,but i cant find find any valid tutorial or something that shows me how to do it.i've checked but what i have found is … | |
Hello I'm taking my first C++ class and I have really embarrassing question ( because I'm sure I'm missing something simple but I just can't figure out what): Why won't my output "dead loop" show after the do while loop ends with the user entering enter? [CODE]// This program will … | |
Hello all: I would be very grateful if someone could help me to understand header and definitions files. A colleague told me that definitions should never be included in a header file, but I also read that template and inline functions should be included. Is this true? If so, is … | |
I am writing a program to make pictures into their negative. But I do not know how to open the bitmap file, I don't know if I should open it as a binary, when I try to my security coding kicks in, and when I open as ios::out my security … | |
Create a Quine, that is, a program that prints out its own source code. (Expert) In this thread [B]Read Me: C / C++ FAQ's and Practice problems[/B] started by ~s.o.s~ how do you create this program. | |
i [COLOR="blue"][/COLOR]I am geting fatal error help me [CODE]/* The United Bank makes certain computerized facilities in their bank to implement customer records and their daily daily transaction records. The bank keeps certain information as follow: INITIAL.dat: acc_no : Account number name : Name of the Accountee address : Address … | |
I am getting the correct chars when i read each individually such as data.at(0), (1)...etc. But when I am trying to read them into variables, i am getting some weird values for some of these. For instance: Getting value of 3, i should be getting the value of 1311780402 Also … | |
Hello, I am new to C++ windows programming and have only taken 1 class in c++ in my life (I have experience with other languages and OOP). I'm using Visual C++ 2008. and my project is created by the wizard for a Windows Forms Application. (I'm guessing this means CLI … |
The End.