51,593 Topics

Member Avatar for
Member Avatar for want_somehelp

Iam having problem with the following code: All this code does is extract words separated by spaces from string when i compile it i get error27 C:\Dev-Cpp\Untitled1.cpp invalid operands of types `char*' and `char*' to binary `operator*' plzzzz help [code=cplusplus] // Tokenizing program:pointer version #include <iostream> #include <cstdio> using namespace …

Member Avatar for ArkM
0
144
Member Avatar for chiwawa10

Hi all, I have a piece of program written in Visual C++ which works just fine in Win XP. However when its run in Vista, the error message "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." …

Member Avatar for Salem
0
118
Member Avatar for Jennifer84

I think this could be a simple question. I have declared a 2D vector like below. The thing is that by default all elements is set to 0. What I want to do is to declare all of these elements to: -1 how this is possible without doing that with …

Member Avatar for twomers
0
740
Member Avatar for PaladinHammer

This thing is pushing me around. I've been through my book, and I have even downloaded the professor's notes on subject (he posted them). I can't find what I'm doing wrong. Below is the code I've written, below the code is what the console is "supposed" to look like. (Code …

Member Avatar for VernonDozier
0
110
Member Avatar for nizbit

I really don't know where to start and to be honest I really don't know what I'm doing. I was given this project and we never went over these topics in class or the previous class. My attempts to wing it are not going so well and quite frankly its …

Member Avatar for ivailosp
0
181
Member Avatar for guest7

Hi, I am using fgets in my program to count the number of lines in file. The number of columns in each line is entered by the user. But the number of lines are not known. After counting the number of lines in the file i am again using it …

Member Avatar for guest7
0
165
Member Avatar for john88

Hi I have a question. Basically I want to create a dictionary of words, where a user has typed in a couple of sentencies. Im then supposed to sort it in alphabetic order and also count how many times a word has appeard. The sentence contains letters and whitespaces. Ex: …

Member Avatar for john88
0
94
Member Avatar for BattlingMaxo

I havebeen using wxdev c++ but have problems when compiling directx code even though I have installed devpaks for DX9 anyway i think the best thing is for me to get a real compiler not freeware. Are there any good compilers that have gui design tools that will compile directx …

Member Avatar for BattlingMaxo
0
121
Member Avatar for LaurenceB

Hi, Ive made a little program that calculates the area of a circle by doing Pi * r2, but its not working and I don't know why: [code=cplusplus] #include <iostream> using namespace std; #define PI 3.14159265358979323846 #define NEWLINE '\n' int main () { float Radius = 0; cout << "Radius: …

Member Avatar for iamthwee
0
71
Member Avatar for Trekker182

I have to take a 2d array of [6][8] floats that represent a star map and add the four surrounding numbers to it to measure it's intensity of light. Would something like make sense??? [CODE]for(i=0;i<6;i++) { for(j=0;j<8;j++) { stars[i][j+1] + stars[i+1][j] + stars[i-1][j] + stars[i][j-1];}}[/CODE] instead of writing many lines …

Member Avatar for Trekker182
0
179
Member Avatar for LuckyMe444

Hello! I need some help figuring out how to display my array. The program I am working on is one in which the user can enter any given 20 integers and it display them in descending order. I was able to get that part to work but cannot get the …

Member Avatar for LuckyMe444
0
87
Member Avatar for nameless987

Hey... do anyone knows c++ function for implementation of big numbers...i tried googl it...but, i can't find nothing that solve my problem i need to calculate a^e(mod n) example: 125^107 (mod 187)=5 result of 125^107 is too big for standard notation in c++... can someone please help me!

Member Avatar for iamthwee
0
1K
Member Avatar for bhoot_jb

i am writing a program on 2-D transformation which handles transformations for three objects, namely, point, line and a triangle. i have created a base class Object and derived three classes - Point, Line, Triangle - from it. Here i will discuss just the Object and Point class. The code …

Member Avatar for bhoot_jb
0
117
Member Avatar for VBNick

I am trying to paint my own form by using the following code: case WM_PAINT: hDC = BeginPaint(hWnd, &ps); hBrush = CreateSolidBrush(RGB(255,0,0)); FillRect(hDC, &ps.rcPaint, hBrush); EndPaint(hWnd, &ps); break; My problem is, that when you resize the form or drag it around, you can still see it flash grey between paints.... …

Member Avatar for Clockowl
0
88
Member Avatar for kazek

I'm trying to create a function that will delete an already saved file. I was hoping std::remove() would do the trick but I don't know the syntax. Will std::remove() work or should be trying something else...

Member Avatar for mitrmkar
0
91
Member Avatar for BeyondTheEye

Well, the basic structure is a form which uses multiple classes defined in seperate files. Below is my controller class which is supposed to keep track of which files are opened. It's included in both the form and the [i]Map.cpp[/i] file, which contains all Map function implementations. I'm supposing these …

Member Avatar for BeyondTheEye
0
262
Member Avatar for robbie_j0

Hi, I am trying to create an application that gets the contents of two folders. It should compare the file names in the two folders and put files with different names into a list (unique). Each file with the same name in both folders should be read and the contents …

Member Avatar for robbie_j0
0
104
Member Avatar for phillipeharris

I am trying to figure out the merge sorting. I have searched the Dani and found other examples but they did not help me. I wanted to figure it out by myself but I cant. here are my Errors : Error 3 error C2446: '<' : no conversion from 'int' …

Member Avatar for ArkM
0
190
Member Avatar for NinjaLink

I need help with my output. I have pretty much everything done. I'm just getting an output like: "The class average is 5.8%" "The class average is 12.4%" "The class average is 13.6%" "The class average is 18.4%" etc. "Highest grade is 58%" "Highest grade is 66%" "Highest grade is …

Member Avatar for Sky Diploma
0
274
Member Avatar for arfte

Hi, guys If you open [url]http://support.microsoft.com/kb/310674[/url] link, you will see there are several ways that make using references in a Managed C++ application. I tried all of them, but i still cannot see the object of the dll reference project. My project is a mixed mode project which contains normal …

0
74
Member Avatar for Yaserk88

Ok. I'm not experienced at all, and I need to program a set of different math formulas into a code. Here is the first step I'm trying to take. I have an octahedron that has 8 plates. Each plate is composed of 3 vectors. There are 6 vectors in total …

Member Avatar for dougy83
0
106
Member Avatar for sretep2122

****I'm stuck as to what my next step should be?? I also want to know if I'm on the right track. I've tried searching for some type of sample program as I am sure there are plenty, but when I start to write it doesn't seem to make sense. Any …

Member Avatar for VernonDozier
0
207
Member Avatar for nizbit

I am writing a program to handle a DVD collection. There are 2 classes. The first class is a string class that has member functions that handle strings(length, compare, etc.) and store strings(dynamic array). The second class handles the actual DVD's-title, year, actors, and brief description. I'm confused on working …

Member Avatar for Ancient Dragon
0
95
Member Avatar for goodmuyis

hello dear guider i design a simple application in C++ 6 using mfc. but when i try to test it on other pc it doesn't run i dont know why because am a dummy. an sorry i might have flame dont blame me am just beginner.

Member Avatar for Duoas
0
90
Member Avatar for blackdove

could someone atleast point me in the right direction? i'm new at this and i've been working on this program and I just hit a brick wall. Its like my brain stopped working or something... :confused: I have to make a "stop watch" program...have a class defined for stop_watch that …

Member Avatar for hjjayakrishnan
0
397
Member Avatar for Sci@phy

Hello. Any way of preventing multiple instances of executables? I'm writing a program that uses a file, it would be quite messy if someone would start another instance of same program. If it depends on OS, I would like to see solutions for windows and unix-type (linux) systems. Thanx

Member Avatar for Duoas
0
412
Member Avatar for AutoC

Hi, My doubt is that..lets say we have an usigned int.If I do a left shift by 32 bits...I'm getting back the original one..shouldnt it be all zeros??

Member Avatar for Duoas
0
114
Member Avatar for AutoC

Hi, I'm trying to code Huffman coding.I've formed my huffman tree but dont understand how I'm gonna assign bits to it.How do I do bit operations and how do i maintain bits of length 3,5 etc? Any help appreciated

Member Avatar for Duoas
0
553
Member Avatar for shalin

Hi All, I want to enable/disable users who logged in Domain Name Server (DNS). Through VC++ code. If anyone has idea regarding this please reply me asap. Thanks in advance for u r reply. Regards, Shalin.

Member Avatar for William Hemsworth
0
999
Member Avatar for jacobdet

so I'm writing a program that takes the input from the file, an ISBN number, removes the "-" from it, puts it through a formula (1*first number 2*second number ... 8*eight number) /11 and what ever that equals should be the same as the last number in the ISBN if …

Member Avatar for mitrmkar
0
306
Member Avatar for ron_jay

I have a serious problem which i am not being able to figure. This program finds all the permutations of a given string using recursion. The diagnostic outputs show that the values of the 'choice' and 'final' character arrays is not maintained at a position (I don't know why). Please …

Member Avatar for Sky Diploma
0
339
Member Avatar for guerilladong

hello,any greate man can tell me the difference between cxx and cpp,h and hxx? waiting the answer,thanks

Member Avatar for Ancient Dragon
0
61
Member Avatar for Synthuir

[CODE]#include <iostream> #include <string> #include <time.h> #define newline '\n' using namespace std; char ch; int main() { cout<<"*A Signed on\n*I Signed on\n"; cout<<"\nA:It's you again, isn't it?\n>I:"; string ent1; cin>> ent1; while(ent1 == "yes" || ent1 == "Yes" || ent1 == "YES") { cout<<"A:No...\nA:It's been so long since you last …

Member Avatar for VernonDozier
0
73
Member Avatar for R3B3L

Does anyone know what's C++'s SETW() Equivalent in Visual Basic .NET ? SETW: Sets the number of characters to be used as the field width for the next insertion operation. Is there anythign similar in VB.NET. Note: I want to use in a ListBox. I've tried using: [CODE] Dim fmtStr …

Member Avatar for selvaganapathy
0
262
Member Avatar for Clockowl

Is it possible to put compile-time conditional code in template functions? Kinda like, [code=cpp] template <class T> void print(T &foo){ cout << foo; #if T == float cout << " is a float." << endl; #endif }[/code] Something like that, I hope I made myself clear. Thanks in Advance,

Member Avatar for Clockowl
0
95
Member Avatar for Congartis

Greetings! My task is to impement [url=http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] by mapping floats to integers, but be able to draw lines of any slope, including horizontal (zero slope) and vertical (infinite slope) lines. (The near-bottom of the page has an integer-only version of this.) My implementation of the linked pseudocode works …

Member Avatar for Congartis
0
651
Member Avatar for princess_19

I really need some help!! I do not understand anything! I do not even know how to start!!! Can any1 help plz!!! “Moore’s law describes a trend in the history of computer hardware. The number of transistors that can be inexpensively placed on an integrated circuit is increasing exponentially, doubling …

Member Avatar for Narue
0
148
Member Avatar for owobass

Please I'm trying to create a sales management software and am experiencing problems trying to create a table like we have on spreadsheets for enterring sales data.I'm using the Win32 API.Could any one give me an idea on how to implement this ? owobass

Member Avatar for marco93
0
740
Member Avatar for nizbit

I was wondering if this code is correct syntax for function parameters in a class? [CODE] class myclass { private: char mystring[50]; int length(char string[]); public: int yourlen(){ return length(_string, _string); [/CODE] I know later in my code, I would have something like this: [CODE] mystring A; char string[50], string2[50]; …

Member Avatar for Sky Diploma
0
124
Member Avatar for kylcrow

Hi everyone. I wrote a Rock Paper Scissors program my first quarter of C++ two years ago, and now I have a job at a programming job. I showed someone my little easy program and they challenged me to make a verson 2.0 with AI and a gui. The Gui …

Member Avatar for kylcrow
0
322
Member Avatar for guitarcrazy44

I have signed up for high school online c++ courses, which has proven to be a mistake, due to my inability to grasp the content. I would like to keep learning, but as the semester draws to an end, I must catch up on my work. This is a project …

Member Avatar for Sky Diploma
0
149
Member Avatar for nesfrank

hi guys, I am a student that I am learning data structures. My professor asked me for this assignment Write a recursive function that will be able to read and dsiplay the elements of an array and the function should not have more than one loop whether it is one …

Member Avatar for Sky Diploma
0
70
Member Avatar for Jawahar prabhu

hi i'm new for c++, i tried to work with mouse pointer on my run window but i dont know how to make interrupt to do it. thanks

Member Avatar for grumpier
0
80
Member Avatar for Infeligo

Hello, I want to test several small apps and would like to group them into one Eclipse project. That is, I have several source files each with a main function. Can I configure the builder to compile each of the source files?

0
62
Member Avatar for clutchkiller

[url]http://www.mixsoftware.com/product/cpvideo.htm[/url] Can anyone tell me if this video and course work is helpful at all? Have any of you guys personally purchased this, or do you believe it to be a waste of time? Keep in mind im fairy new to programming. Thanks

Member Avatar for Ancient Dragon
0
156
Member Avatar for DeboJackson

Hello everyone. I know this is a C++ forum not MySQL forum but I need help with the C++ library for MySQL I am hoping that there will be people here who are knowledgeable about MySQL++. My problem is that I can't get the g++ compile to link to the …

Member Avatar for Normand Bedard
0
220
Member Avatar for skabaw

How to get the invoked command and parameters as one string instead of a list of argv-s (especially gcc under Linux)?

Member Avatar for Narue
0
72
Member Avatar for MAD_DOG

How long did it take you to learn C++ or C or VB. I learning some what C for my Linux class.

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

Hi, Trying to play with multithreading by taking some of my existing apps and converting them over. In doing so, I noticed a strange phenomenon that I've been able to reproduce in a very simple program. let's say I create 2 threads. Each thread simply does a for loop from …

Member Avatar for Ancient Dragon
0
143
Member Avatar for man4ish

#include <iostream> #include<string> using namespace std; class substr { public: void getsubstr(char* b, char* db) { char* stpos = strstr(db,"gi|"); int pos = db-stpos; char* end = strstr(db,"|ref"); int endpos = abs(db-end); b= new char[endpos-pos+2]; int i=pos+3; for(;i<endpos;i++) { *b++=*(db+i); } *(b+i)='\0'; } }; int main() { substr* s; char* …

Member Avatar for iamthwee
0
82

The End.