49,761 Topics

Member Avatar for
Member Avatar for TurboCoding

I have used IT++ for half a year, which is a C++ liabrary. Recently, I got a problem when I try to write the HEADER file for a class, with a member which is another class object. Here is part of my code: [CODE] class A { private: fixvec fv; …

Member Avatar for TurboCoding
0
164
Member Avatar for hg_fs2002

I have a text which consists of several paragraphs in which each paragraph consists of several lines. I have the number of paragraphs and now I want to store the number of lines in each paragraph in a vector.This is what I've written and doesn't work properly: additionally,a paragraph is …

Member Avatar for vijayan121
0
95
Member Avatar for nwhitfield

i know it might seem a little bare but i wanna know if im on the right track so far. for most of it im making a guy and a function that will increase his lvl when xp is reached. Then i reset the xp and increase the ammount of …

Member Avatar for nwhitfield
0
120
Member Avatar for Resnymph

Hello, I am trying to write a GUI in Visual C# which controls a C++ DLL, specifically getting hold of C++ objects and editing them via the C# propertygrid controls. - The first part of the question is 'is this actually possible'? I know I can use wrapper functions to …

0
215
Member Avatar for bilalb1

hi hope anyone who reads this post is doing well/will be doing well soon enough :) ... i have a small problem... i have a program in c/c++ (i am using just a few functions of c++) which creates a log of files after doing some search(its not relavent to …

Member Avatar for Ancient Dragon
0
548
Member Avatar for kneel

Hello, I'm having an error in my code plz someone solve my problem. I just want to multiply the element # 1 of an object array from the element # 2 of another object of same class and so on. Plz help me. Thx Error: int MyCLass::getValue(): invalid conversion from …

Member Avatar for Fbody
0
123
Member Avatar for crapgarden

[COLOR="Red"]3.1 - ARRAY arguments, char vs int.[/COLOR] It seems you pass a char OR an int to a substring of an array. Does it matter which one? ex: [CODE] char charValue = 5; int intValue = 5; string awesomeArray[9] = {"truck", "car", "boat", "table", "ocean", "cat", "board", "finicky"}; //Both of …

Member Avatar for Fbody
0
118
Member Avatar for johnnyturbo3

Hello, Having a problem with 2 classes: a class that is used to go through file directories and collect the file names in a vector, the other just creates an instance of this class. This code is from an older version of the program so I know it works. However, …

Member Avatar for Fbody
0
805
Member Avatar for deanus

Hi, I've just started using MS VC++ 2010 express and I have a problem which when using Dev C++ I've never had... VC++ doesn't allow me to allocate elements for an array using a variable as a subscript, like this : [CODE] int maxElements = 10; char myArray[maxElements]; [/CODE] It …

Member Avatar for alaukik
0
86
Member Avatar for crapgarden

[COLOR="Red"]5.8 - Function Declaration vs Array Declaration SYNTAX CLARIFICATION[/COLOR] this declares an array: string word2("Over"); string word3(3, '!'); how are these not being mistaken for functions that pass default parameters? Is it because the parameters placed above are not = to anything or being defined as a type? Are the …

Member Avatar for crapgarden
0
174
Member Avatar for nshuti

Thank you friends.I have just began c++ and i dont know were to state from.If any one can help me pliz you are welcome.Thanx

Member Avatar for sfuo
0
83
Member Avatar for ttx336

I am using Bloodshed Dev C++ 4.9.9.2 but I am having a tough time understanding how to use their debugger... I can't get it to single step. It tells me there is no debugging information, I let it include debugging information when it aks me for permission to but still …

Member Avatar for sfuo
0
142
Member Avatar for hg_fs2002

I want to write a function to add nodes to the end of my linked list. My problem is that I don't know how I can have a pointer that always points to the first node of my linked list.Forexample if I write [CODE] Gnode*p = new Gnode; first->link=p;[/CODE] when …

Member Avatar for hg_fs2002
0
95
Member Avatar for Brucesharky

Hi. I need some help with my recursive backtracking function for boggle. I don't know what the bug is. The board is 4X4 and i set a test case which is "thisboggleisnotw" t h i s b o o g l e i s n o t w apparently for …

0
26
Member Avatar for scott_6169

I am trying to get something to print to my screen aftre i type in the source code. Eveytime i compile and run it it just flashes a dos screen real fast and goes away. How can I see what it is printing to the screen. If anyone can help …

Member Avatar for Ghazanfar Ali
1
201
Member Avatar for mrnutty

This is a simple demonstration of meta programming. It shows the idea of meta programming. It basically calculates the factorial of a number before runtime. When I first saw the concept of meta programming, it blew my mind so badly. I was so surprised that one could do this. Its …

Member Avatar for griswolf
2
407
Member Avatar for Brian Perrigan

[CODE] #include <iostream> #include <string> #include <sstream> using namespace std ; int main () { char promptisbn [] = "Plese Enter 10 Digit ISBN" ; string isbn ; int x = 0 ; char buffer[1024] ; cout << promptisbn << endl ; cin.getline ( buffer, sizeof(buffer), '\n') ; isbn = …

Member Avatar for Brian Perrigan
0
146
Member Avatar for Agni

Hi, I have always been a little confused about inline/non-inline virtual functions and got a little more confused when I read this in a book: According to the book the code below will fail to link on many systems(it gave no errors on mine, g++ 4.4.1). The explanation is "Even …

Member Avatar for mrnutty
0
645
Member Avatar for rehamz

hi please, i want to write code to draw array of circle on screen but without opengl, and i have problem with graphics.h i don't know who can i use it's function and my compiler can't built it . thanks in advance .

0
77
Member Avatar for insanely_sane

Alright. So I have a Macbook Pro. I also know a bit of c++. I want to know how to draw simple shapes. You know, rectangles, circles and stuff. Like in java (while using console) you can do c.drawRect and stuff? Same way.. is there something or some way to …

Member Avatar for ramox
0
332
Member Avatar for Jackie91

someone help me pls...The 'Add' works fine..but when i try to open it,my full name didn't show completely , such as 'Jack Sparrow' = 'Jack'.. help me pls. #include<fstream> #include<iostream> #include<string> using namespace std; void main() { string name; int age; int options =0; char filename[20]; while (options!=3) { cout …

Member Avatar for Jackie91
0
75
Member Avatar for saransh60

hi i want ask how things get copied when i assign one object s1 to the another object s3(s3=s1)of the same class string in the following given example,also tell why constructor 1 needs to be initialized like str[0]='\o' ..thanks in advance [code]#include<iostream.h> #include<string.h> #include<conio.h> const int max=80; class string { …

Member Avatar for sfuo
0
124
Member Avatar for linziza

Hello Everyone, I am working on this [URL="http://www.ibm.com/developerworks/opensource/library/os-eclipse-stlcdt/#author1"]Eclipse development tutorial from IBM[/URL]. I had already installed Eclipse prior to finding this tutorial and had installed MinGW instead of Cygwin. But other than that change, I followed the "Lottery" programming tutorial precisely until I got stuck at the Running the Program …

Member Avatar for Fbody
0
110
Member Avatar for fenerista

there is a string like [CODE] 0123456789 string a = "25 + 5.6 - (54 - (-61))" a[0] = 2 a[1] = 5 2 = 3 = + 4 = 5 = 5 6 = . 7 = 6 8 = 9 = - 10 = 11 = ( 12 …

Member Avatar for fenerista
0
118
Member Avatar for adaniel058

I would like to create a battleship game in C++. I have the game working but I cant really decide how to determine what positions make up a ship. My game board is a 15 x 15 so, for example: 0000000000000010 0000000000000010 0000000000000010 0000000011000000 0001000000000000 0001000000000000 ect.... So what I …

Member Avatar for Silvershaft
0
174
Member Avatar for help1

GUYS DO YOU KNOW ANY SITE OF FREE Practicing C++ CAUSE I DONT HAVE ANY PROGRAM IN MY COMPUTER AND I NEED TO RUN MY SYNTAX TNKS GUYS BTW IM NEW ABOUT COMPUTER SCINECe TNKS AGAIN:)

Member Avatar for daviddoria
-2
87
Member Avatar for dansnyderECE

I chopped down my make file so I can compile a C++ program with very few, but some flags set to see if I can determine if they are working. The following is my make file section on C++ flags: [CODE]# Common compiler flags CFLAGS = -mips1 -Wa,-non_shared \ -mno-abicalls …

Member Avatar for vijayan121
0
552
Member Avatar for broli100

Hi, I have problem with OpenGl tesselator - the polygon shapes are ok but when I light on polygon then I can see the triangles with another light levels. I know that tesselator draws polygons from triangles but I dont get why I can see that triangles in final stage. …

0
57
Member Avatar for johnariate

can you help me guys about how to create program that can compute prelim,midterm/prefinal,finals thanks

Member Avatar for Nick Evan
0
39
Member Avatar for Anatake

I have a (I thought:confused:) relatively simple converter project I am writing with Visual Studio 2010 C++ Windows Form App. So to be forthwith I am completely stumped as to how I would get the user input from the Amount box (1234.12 for example) and the Rate box (1.04108 for …

Member Avatar for jonsca
0
220

The End.