49,757 Topics
| |
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 … | |
[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 … | |
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, … | |
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 … | |
[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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| [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 = … |
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 … | |
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 . | |
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 … | |
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 … | |
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 { … | |
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 … | |
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 … | |
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 … | |
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:) | |
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 … | |
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. … | |
can you help me guys about how to create program that can compute prelim,midterm/prefinal,finals thanks | |
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 … | |
I'm not sure if you all need all my files, but I'm getting the following error message when compiling: productionworker.cpp(8) : error C2440: '=' : cannot convert from 'const char [4]' to 'char' productionworker.cpp(10) : error C2440: '=' : cannot convert from 'const char [6]' to 'char' Can anyone help? … | |
So, I'm working on a project for my Intro to Software Development course; it's a sudoku puzzle program. So far, I've encountered two big bugs: 1.) When I wrote the code in Visual C++, the display worked fine(it showed up on the screen as a normal puzzle), but when I … | |
Hello everyone, I'm newbie with c++. I need to ask you probably a very simple question. When I write a file with numbers from an array I then read in a file something like: 7 8 9 10 11 12 When I then read this file and print on screen … | |
hy! I am writing an integer array class. but there is problem to return array from getter function. any one tell me the procedure of this task. And tell about extract operator for that class.[code]#include<iostream> using namespace std; class integer{ friend ostream& operator<<(ostream& output, const integer& num); private: int array[10]; … | |
I have a nice c++ program going right now, and I want to create a new feature for my users. The problem is, this new feature would cost me money. So what I would like to do is charge users if they decide to use this feature. I would love … |
The End.