49,761 Topics

Member Avatar for
Member Avatar for Crutoy

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 …

Member Avatar for lisaroy1
0
272
Member Avatar for Phinisher

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 …

Member Avatar for griswolf
0
109
Member Avatar for megaLU

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 …

Member Avatar for jonsca
0
2K
Member Avatar for LeMajestique

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; …

Member Avatar for LeMajestique
0
112
Member Avatar for jmaple

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?

Member Avatar for jmaple
0
94
Member Avatar for lius84

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; /* …

Member Avatar for mike_2000_17
0
173
Member Avatar for rdx71
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
200
Member Avatar for martin11ph

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 …

Member Avatar for mrnutty
0
150
Member Avatar for ThatGuy2244

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 …

Member Avatar for ThatGuy2244
0
121
Member Avatar for kchyn

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 …

Member Avatar for pseudorandom21
0
3K
Member Avatar for hystaspes

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 …

Member Avatar for iamthwee
0
238
Member Avatar for winecoding

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 < …

Member Avatar for mike_2000_17
0
120
Member Avatar for RuneFS

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, …

Member Avatar for IssamLahlali
0
113
Member Avatar for somshridhar

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 …

Member Avatar for kernel>panic
0
4K
Member Avatar for muze

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 …

Member Avatar for Ancient Dragon
0
80
Member Avatar for JordanHam

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 …

Member Avatar for Fbody
0
107
Member Avatar for Annettest

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 …

Member Avatar for Annettest
0
216
Member Avatar for kookai

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 …

Member Avatar for Nick Evan
0
2K
Member Avatar for hystaspes

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 …

Member Avatar for ravenous
0
191
Member Avatar for ajst

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 …

Member Avatar for ajst
0
359
Member Avatar for rohan1020

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 …

Member Avatar for Moschops
0
109
Member Avatar for pucivogel

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 …

Member Avatar for pucivogel
0
305
Member Avatar for frank731tr

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 …

Member Avatar for frank731tr
0
117
Member Avatar for Annettest

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 …

Member Avatar for thelamb
0
238
Member Avatar for Nandomo

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 …

Member Avatar for Moschops
0
125
Member Avatar for krnekhelesh

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.

Member Avatar for mahaju
0
1K
Member Avatar for shivakumar10340

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 …

Member Avatar for WaltP
-1
178
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
505
Member Avatar for shawnhanna

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 …

Member Avatar for shawnhanna
0
683

The End.