49,757 Topics

Member Avatar for
Member Avatar for venomxxl

I'm writing a small game engine and I have a little problem. The code below shows the exact situation: Header1.h [CODE] #ifndef _HEADER1 #define _HEADER1 #include "Header2.h" namespace HNamespace { class HClass1 { public: HClass1() { } ~HClass1() { } HClass2 * A; }; } #endif [/CODE] Header2.h [CODE] #ifndef …

Member Avatar for venomxxl
0
100
Member Avatar for ndowens

I am wondering if somebody could recommend a good book and/or tutorial for an absolute beginner with no previous programming experience. Thanks. Also If I can do decent at programming, I may end up going to college in order to try and make programming a possible career

Member Avatar for Bench
0
133
Member Avatar for atman

Hello! I'm new to c++ but I have a problem and desparate for help. I'm trying to store string and integers into a file, but only strings get stored and integers dont. I tried casting,didnt work. Not to convolute you with my code, I came up with this small program …

Member Avatar for StuXYZ
0
114
Member Avatar for jsparger

Hi guys, Shortly my research group will be getting a big fancy set of CAEN VME nuclear instrumentation modules. It will be my job to write some C/C++ programs to control all of these modules. That's about as far as I understand. I'm a C++ baby (I know some Java, …

0
35
Member Avatar for NathanOliver

Hey all I have seen a lot of stuff about palindrome checkers so I thought I would write one that works for STL containers as well as arrays. it accepts a bidirectional iterator to the first element and an bidirectional iterator to 1 after the last element. Included is a …

Member Avatar for NathanOliver
3
328
Member Avatar for Grep

Hi guys, I would like to execute something like this in my program: system("C:\test\perl\a.pl"); But the problem is i need to execute: perl a.pl Can't just execute the a.pl and expect it to run. Any ideas on how i could simply open up the cmd prompt with my program and …

Member Avatar for Grep
0
239
Member Avatar for zoner7

I have a vector class that is defined using a template. VS 2010 is underlining every instance of these templates, claiming that the identifier Scalar is undefined. Peculiarly, these errors only occur in the definition of the class I will list first but not the one that inherits it. Here …

Member Avatar for thelamb
0
102
Member Avatar for Grep

I would like my C program to run my perl script: I have something like this in mind: system("C:\test\perl\a.pl"); But obviously it needs to do perl a.pl. Not just execute the a.pl. Any ideas? Something simple would be appreciated.

Member Avatar for Grep
0
55
Member Avatar for has problems

I am having a Visual C++ Debug Assertion Failure. It is happening after the internet opens and then try to go to website thats not the homepage. here is the info in the message: Program: C:/Program Files/Internet Explorer/IExplore.EXE Files:dbgheap.c Line:1132 Expression:_CrtIsValidHeapPointer(pUserData)

0
38
Member Avatar for ShortYute

I'm new to c++ however, I have been doing C for about a year now so OPP and all its related things are new to me ( classes etc. ), i have the program in C so I'm trying to find a better way to implement it... Thanks in advance …

Member Avatar for ShortYute
0
120
Member Avatar for dansnyderECE

I'm trying to use .open() but I'm having an issue with my arguments to this function. Here's my code: [CODE] vector<string> FDT_filename; ifstream is; is.open (FDT_filename[0], ios::binary );[/CODE] Which results in the following error: [CODE] ../sim_main.cpp:297: error: no matching function for call to ‘std::basic_ofstream<char, std::char_traits<char> >::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const …

Member Avatar for dansnyderECE
0
181
Member Avatar for AspiringCoder

How would you take an int and make each diget into a array element? For example: [CODE]int num = 12345; int nums[4]; // how ever you enter numbers into the array // would result in: // nums[0] = 1 // nums[1] = 2 // and so on...[/CODE]

Member Avatar for AspiringCoder
0
166
Member Avatar for dohpaz42

In a nutshell I am trying to write a program that will connect to a database, query several tables for various sets of data that will then be transformed into XML that is stored into a file on the local hard disk. My first thought process to solve this problem …

Member Avatar for dohpaz42
0
201
Member Avatar for stonerain

I am trying to use the CalcOpticalFlowBM function but I don't understand hot it works. I want to find a motion vector for every blocks but I don't understand that the CalcOpticalFlowBM yields velX and velY. I wrote below code . [CODE]/* Create an object that decodes the input video …

Member Avatar for bart.scotty
1
696
Member Avatar for dinesh.isuranga

I have a Report Model List Controller and I want to get Selected Row Of data to be used.. my Row has there are four data colums.. Name.Age,Birth and Salary... please help me to solve this... thanks...

Member Avatar for CrazyDieter
0
82
Member Avatar for zainabalkhalili

i need help converting this C++ to pseudocode help me pleasee [CODE]#include <iostream> using namespace std; { string Z[]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"; string A[]={"zero","ten","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"; int N,N1,N2,N3, r; string text; N1=N/100; r=(N-(N1*100)); if (r<20){ cout<< Z[N1]+"hundred and"+A[r]; } else{ N2=(N-N1*100)/10; N2=r/10; N3(r-(N2*10)); cout<<[N1]+"hundred and"+A[N2]+[N3]; } cin>>N; return 0; }[/CODE]

Member Avatar for markzain
-2
84
Member Avatar for kudalwarang
Member Avatar for dansnyderECE

I think this is an easy question but I don't know the answer to it. How does one link the value of an argument to a function and the functions parameters? For instance: [CODE]int a; int b; void fn(int &c, int &d) { c++; d++; } int main() { fn(a,b); …

Member Avatar for aman rathi
0
173
Member Avatar for Alex314

Hello, This is probably trivial, but I can't find a solution to the following problem. In C++Builder 2007 I was able to write different strings both to the Application's Title and to the Main Form's Caption. In the Title I displayed the name of the Application; in the Caption (showing …

Member Avatar for Alex314
0
148
Member Avatar for dchunt

Say i have a 256 byte file. How many additions or multiplications can a modern computer perform on them using c++ ? I've been working on this c++ compression project that does a lot of calculations. I use Dev-cpp,and am a amateur programmer,i've not used pointers,vectors or anything fancy yet,anyway …

Member Avatar for thelamb
0
1K
Member Avatar for mksakeesh

Please check the below code template<class T> class Row { public: Row(int cols=0):row(NULL) {SetRowSize(cols);} ~Row() {SetRowSize(0); } Row(const Row &r):row(NULL) { SetRowSize(r.numCols); for (int i=0;i<numCols;i++) row[i]=r.row[i]; } void SetRowSize(int n) { if(row) delete[] row; if (n>0) { row=new T[n]; memset(row,0,sizeof(T)*n/sizeof(char)); } else row=NULL; numCols=n; } int size() { return numCols;} …

Member Avatar for thelamb
0
119
Member Avatar for dualdigger

How can I manage to lock or unlock access db query table. e.g. I have a game which displays few questions and then answers which are taken fromt the access db records. What I want is during the game play, it should remain lock till it is accesed, so that …

Member Avatar for nehasidana
0
196
Member Avatar for aliyami90

Hi guys How do I search a file ".txt" which contains three lists side by side for a word , then print the line that the word I searched for is in? NOTE: -The lists are lists of names . it would be beter if you show how to do …

Member Avatar for aliyami90
0
127
Member Avatar for nyarufuka

Guys I am seeking help on the following two dimensional arrays, using matrices. (a) Enter elements of two matrices A and B. (b) Add the matrices and store the result in matrix C. (c) Subtract matrix A from matrix B, and store the result in matrix R.

Member Avatar for mrnutty
0
89
Member Avatar for usafsatwide

I'm in a computer programming class and having trouble. The assignment is: [I]Write a program that uses a structure named MovieData to store the following information about a movie: Title Director Year Released Running Time (in minutes) The program should create two MovieData variables, store values in their members, and …

Member Avatar for NathanOliver
0
417
Member Avatar for shadowuy

Hi im starting to learn c++ and im having a little issue that im not capable of correct yet... the program ask the user to imput the size of an array then the program create it at that size, fill it with random integers and output the array into the …

Member Avatar for thelamb
0
170
Member Avatar for romyboy2k9

Hello, could some please help me with a current project that I'm working on for school? I have the following code, but the output shows unknown address. The following is the description of my assignment, and the code I have so far. Thank you. Write a program that creates a …

Member Avatar for thelamb
0
123
Member Avatar for panda_pow

Hey everyone :) So I'm doing my homework when I get this massive brainfart. It's all done, and everything works, except I need a way to make [B]j[/B] [in the function AddStudents()] get bigger without resetting to 0 everytime the function is called (so it moves to the next cell …

Member Avatar for panda_pow
0
147
Member Avatar for nbaztec

Ok, I need to know some methods(links, articles, etc.) regarding how to parse & comprehend 32-bit grayscale bitmaps on the basis of their data. Suppose I have a black background & a white primitive of medium resolution is there any way I can identify the primitive as a Circle, Box, …

Member Avatar for nbaztec
0
288
Member Avatar for pubis

Here's a code I use (ignored error checking) to read two registry values, combine them and write them to a third one. [CODE=c]unsigned long type=REG_SZ, size=1024; char iLike[1024]=""; char Apples[1024]=""; char iLikeApples[1024]=""; LONG rV; HKEY hKey = NULL; // reading the first value rV = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\FARM\\ValueName1", 0, KEY_ALL_ACCESS, hKey); …

Member Avatar for pubis
0
133

The End.