51,593 Topics

Member Avatar for
Member Avatar for VBNick

right now, I am allocating a dynamic 2D array for my rasterizer's edge list. My setup looks like this: [code="cplusplus"] struct EDGE { float x, dx; float uvws[4]; //u, v, 1/z, shade float duvws[4]; float y_limit[2]; bool active; }; struct EDGERECORD { EDGE *left_edge; EDGE *right_edge; EDGE edges[9]; UINT16 num_edges; …

Member Avatar for VBNick
0
140
Member Avatar for BruenorBH

I am creating a program in Dev-C++ v. 4.9.9.2 using Win32 API that loads from a file and saves to a string. The only issue is that I cannot split the string to the requested variables... Here is what is in the file... 08:00:00 PM, 08:00:00 PM, 08:00:00 PM, 08:00:00 …

Member Avatar for BruenorBH
0
114
Member Avatar for wrxhokie

I have a C static library that I need to link to a new DLL i'm creating. I'm using Visual Studio 2005, and created a console application that outputs a DLL. But when I try to compile I get unresolved external linker errors: Error 2 error LNK2019: unresolved external symbol …

Member Avatar for wrxhokie
0
325
Member Avatar for freddan007

Hello, I've started learning how to make simple GUI programs in cpp using theforgers tutorial. However I was going to add XP style to my program and I found a page that showed me exacly how to do it for VC++ 6. The problem when I had added the lines …

Member Avatar for freddan007
0
763
Member Avatar for ahfrey85

Hi, while doing my assignment im somehow stucked somewhere which i didnt know why and i need some help. i have jus started learning abt c++. so im jus using some basic syntax [code] #include<iostream> using namespace std; int main() { int selclass,i,position; char ch; int seats[100]={0}; //array while(true) { …

Member Avatar for ahfrey85
0
125
Member Avatar for erialclaire_238

Newbie here. i need to create a program with this output: Enter 5 values: 3 4 5 7 9 Enter a number to search: 4 4 found in location 2 Anyone who can help me on this? Tnx, Claire

Member Avatar for skatamatic
-1
98
Member Avatar for bluemm87

I'm trying to learn C++ with a book and it has this example program in it, but when i try to compile it, it comes back with error C2065: 'localVarable' : undeclared identifier. What's wrong with it? [code=cplusplus] // allocating and // deleting a pointer #include <iostream> int main() { …

Member Avatar for bluemm87
0
76
Member Avatar for risa

How can i prevent a dialog closing by Alt+F4 ? I am using PreTranslateMessage(),,,,what is the Virtual key #define for Alt+F4 or is there any other way?,,,,thank you

Member Avatar for mitrmkar
0
249
Member Avatar for crewxp

For some reason, I can't get scanf to work. I did it just like the book said. Try it. I'm supposed to enter (FirstInitial)(LastInitial)Grade Ex: TB100 For Tom Brady got a 100. It reads: FirstInitial: NOTHING LastInitial: T Grade:0 Then it skips to the second student and did this FirstInitial: …

Member Avatar for siddhant3s
0
296
Member Avatar for 10Pints

Just started using this compiler - with my old VC6 code, but it seems to think a directory is readonly when it isnt? - any ideas? this is at/after the last the line of the file compiler output: c:\data\dev\cms\3.0.0.0\code\word\src\word.cpp(220) : fatal error C1083: Cannot open include file: 'c:\data\dev\cms\3.0.0.0\code\word\src': Permission denied

Member Avatar for 10Pints
0
253
Member Avatar for raj_mah
Member Avatar for serkan sendur

hi guys, i wonder if there is technically any difference between using break or return in order to quit a loop without reaching its condition?

Member Avatar for Narue
0
1K
Member Avatar for vicky_dev

Hi, I need a control my native application written in C++ that provides a functionality similar to the SplitContainer control of .NET (System.Window.Forms.SplitContainer). I couldn't find any native control that does the job. Can I get such control or do I have to write it myself? Thanks in advance

Member Avatar for vicky_dev
0
95
Member Avatar for joejoe55

Been working on this little thing for a few months now, having some issues with some structs. This compiled correctly in vs 2003 but doesnt work properly in c++ 2005. (Most of this is others work and open sourced stuff) Any help is appreciated with why I ths doesnt work. …

Member Avatar for mitrmkar
0
192
Member Avatar for billchow24

For example, I have an input text file like a labyrinth I use the array[x][y] to storge each charater in the labyrinth When i start at the top left hand corner, i need to go out to the exit at the bottom right hand. There are two paths as indicated …

Member Avatar for DemonGal711
0
294
Member Avatar for ronicasingh

Hello guys, Does anyone know how to keep a console window active till the user presses any key on the keyboard to close the console? Everytime I create a program on devcpp, when I run it the console window just doesn't stay there, it disappears within seconds. I knew how …

Member Avatar for Freaky_Chris
0
189
Member Avatar for sonicstage

I have this algorithm from my c++ class that i can't get to work, it doesn't compile (mainly because is wrong) and I have no idea on how to fix it. It supposed to be a global function that takes an array of 10 and gives 10 random numbers from …

Member Avatar for Freaky_Chris
0
108
Member Avatar for moshe5

I am supposed to implement an ADT polynomial, using an array for polynomial coefficients- using- degree() - gives the highest degree in the polynomial. coefficient(power)throw(InvalidPowerException) changeCoefficient(newCoefficient, power)throw(InvalidPowerException) overloaded + operator to add 2 polynomials overloaded << operator I cannot use a list class for this project. special cout cases: +1, …

Member Avatar for ithelp
0
106
Member Avatar for kinsey

Hi, I need some help with a C++ assignment. I'm supposed to write a Hangman program that will: The user should be able to choose between playing against the computer, or against another human. The only difference will be how the word to be guessed is selected: If playing against …

Member Avatar for vivekc++
0
867
Member Avatar for DemonGal711

I'm writing the class for the N-ary tree and I need to finish it with a destructor. For my tree, all I do is insert, traverse, print, and destruct it basically. The part of the code dealing with it will be something like: [code]while (/*not at end of input*/) { …

Member Avatar for DemonGal711
0
310
Member Avatar for azwraith69

hello,,:) i have problem doing a FOR loop in my linked list,, it doesn't start the loop,, i don't know why... [icode]class node { public: node(int number, node*nxt):number(number),nxt(nxt){} int getNumber(){return number;} void setNumber(int number){this->number=number;} node* getNxt(){return nxt;} void setNxt(node *){this->nxt=nxt;} private: int number; node *nxt; }; bool mergeList(node *&result, node …

Member Avatar for kbshibukumar
0
146
Member Avatar for redhotspike

Ok, so I am befuddled. Each individual file compile fine, no errors. When I compile all together and create an executable, no errors. But, when I run the program, I am getting an error. I have it narrowed down to a problem with my [icode]void LinkedList::insert(const ElementType &dataValue)[/icode] but I …

Member Avatar for redhotspike
0
184
Member Avatar for daviddoria

I have tried to make a SumVector function for all types, but if it is called with a vector of unsigned char's, it will do something special. Here is what I tried, but I get a multiple definitions of the function compiler error. [code] template <typename T> void SumVector(vector<T> &V) …

Member Avatar for nucleon
0
3K
Member Avatar for monkey_king

I'm having troubles linking together different classes that uses the same templated class. I found 2 workarounds, that will make it compile, but it's not really a solution. 1. don't do a staged compiling with linking object code 2. inlining the spezialized member functions. I'm looking for a solution that …

Member Avatar for StuXYZ
0
848
Member Avatar for moshe12007
Member Avatar for Bladtman242

Is there a simple way to run another program, say IE, FF or just a simple .bat file sith c++? ive searched around a bit but all ive found is rocket science and didn't seem to be what im looking for. i dont wish to run it "trough" my program, …

Member Avatar for Bladtman242
0
1K
Member Avatar for mmeyer49

My code is supposed to accept into for book data and sort it. My problem is when i enter Data it doesnt return to the menu. i know atm it is // but it seems to fail after i enter the data. Also i'm having problem trying to add the …

Member Avatar for r.stiltskin
0
189
Member Avatar for Mossiah

[code=cplusplus] #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; char your_string[256]; char new_string[256]; void ReverseString(); int main() { char choice; do { cout <<"Enter the string that you want to reverse: \n"; cin.getline(your_string, 256); ReverseString(); cout << new_string << "\n"; cout <<"Do you want to continue? Press …

Member Avatar for vmanes
0
111
Member Avatar for cipher

Iam trying to call a C# DotNet 2003 webservice from Visual C++ 6 app (used win32 console, mfc, atl_mfc dll) using Soap toolkit 3. The webservice takes a String input parameter and returns a String. The input parameter I pass through C++ is always recieved as NULL in C# webservice …

Member Avatar for yogesh.chhabra
0
336
Member Avatar for jibber87

Hi there, I'm trying to write a program that calculates the probability distribution for different initial conditions of a population model. The probability is calculated over a for loop over the parameter 'q' (which can be considered as a scaled version of the correcting "struggle for life" term in the …

Member Avatar for jibber87
0
155
Member Avatar for jeevsmyd

Hi... Do you remember me? Am the amateur programmer who disturbs you with my never ending doubts.. :D As you guys advised I have decided to start learning c++ from scratch..! ;)As far as am concerned Files in c++ is the most difficult part in c++ in my syllabus ..! …

Member Avatar for Narue
0
169
Member Avatar for krispygrimace

First, I apologize for any concept errors about C++. I am pretty new. I am having trouble iterating through each node of a passed linked list. What I have right now is an implementation file with a few functions. The class is called listClass and has a private member function …

Member Avatar for jencas
0
181
Member Avatar for crewxp

I have a small problem. I'm curious to see why this happens. If you run this code and enter the data, I put in a debug line. Inside the 'if (grade2>grade) block, the DEBUG printf's don't show the data correctly. Outside the if block, I print pretty much the same …

Member Avatar for crewxp
0
145
Member Avatar for pete08

Hi, does anyone knows how can I create POP3 server (not client) in C#. I'm not talking about downloading some commercial solution, but developing new one. Pete

Member Avatar for miculnegru
0
91
Member Avatar for pavani-murali

Hi Every one, Can you please send me what is summit APi and how it is useful along with C+? Regards, Pavani

Member Avatar for ithelp
0
31
Member Avatar for Mossiah

[code=cplusplus] // New2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; void reverse(string& s); int _tmain(int argc, _TCHAR* argv[]) { string st="Word" ; cout<<st<<"\n"; reverse(st); cout<<st<<"\n"; return 0; } void reverse(string& st) { int i; int j …

Member Avatar for iamthwee
0
167
Member Avatar for tux4life

Hello, My problem is that the program always gives the same output: [CODE]There were no matching numbers !!![/CODE] The source of my program looks as follows: [CODE=cplusplus] #include <iostream> using namespace std; int main(void) { const int MAX_CHARS = 500; const int MAX_NUMS = 5; const int MAX_NUM_CHARS = 25; …

Member Avatar for tux4life
0
137
Member Avatar for sunderthomas

hey guys i want to slpit a sentence into words but the pogram i have written gives only the first word...can u help me plz..... [code] #include<iostream.h> #include<conio.h> #include<string.h> #include<dos.h> #include<stdio.h> void main() { clrscr(); char text[100]; int i=0; clrscr(); cout<<"enter the sentence"; cin.getline(text,100); while(i<strlen(text)) { char text1[]=" "; int …

Member Avatar for monkey_king
0
165
Member Avatar for Crul

I'm trying to compile C and C++ files into a single executable using gcc. I've gotten my code to compile and run properly using borland and Visual Studio but I can't figure out how to get it to compile with gcc. This is what I've been trying: gcc -c dtio.h …

Member Avatar for Salem
0
1K
Member Avatar for vishy_85

im new to c++. im trying to create a function to get the systemtime every 1 minute and store it in a variable. im able to display the time using the time.h file. the problem is i dont know how to call the function every 1 minute and assign it …

Member Avatar for siddhant3s
0
84
Member Avatar for tpetsovi

The last funtion IsPrimeNumber () is giving me an error that states ..."Local Function definitions are illegal"....can someone please tell me why? Thanks [CODE] /****************************************************************** Name : Date : Homework # : Homework #6 Problem #1 Source : Action : Menu is displayed allows user to calculate Miles per Gallon, …

Member Avatar for kbshibukumar
0
187
Member Avatar for vkarthik

Consider this situation: [code=c++] class Sample { std::string str; public: Sample(string &s) { // line 1 // line 2 str = s; // line 4 throw exception; } ~Sample() { } } [/code] So I have a string member variable, and I have assigned it to the parameter passed to …

Member Avatar for vkarthik
0
165
Member Avatar for TheBeast32

Hi, I'm reading the header from bitmaps. When I add up everything in a struct I've made, it comes out to 54 bytes. When I do a sizeof(BHeader), it says it's 56 bytes. It adds two null bytes after the B and the M when I save a header to …

Member Avatar for TheBeast32
0
104
Member Avatar for Mossiah

[ICODE] #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; char your_string[256]; char new_string[256]; void ReverseString(); int main() { cin.getline(your_string, 256); ReverseString(); cout << new_string << "\n"; return 0; } void ReverseString() { int x = strlen(your_string)-1; for(int y = x; y >= 0; y--) { new_string[x-y] = …

Member Avatar for William Hemsworth
0
74
Member Avatar for Mossiah

[ICODE] #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; // prototype declarations void concatString(char szTarget[], char szSource[]); int main (int nArg, char* pszArgs[]) { //read the first string char szString1[256]; cout << "Enter string #1: "; cin.getline(szString1, 128); //now get the second string char szString2[128]; cout << …

Member Avatar for siddhant3s
0
84
Member Avatar for eck3ko

Hi everybody i really need your help, this is my problem: I have a c++ dll that use MFC, i need to use it in a c# project I need to end with another dll that to use it in the c# project I just cant find solution all over …

Member Avatar for eck3ko
0
172
Member Avatar for MrPickle

I want to store several structs in a vector, but the struct has a template so I get a compile error, how can I store the structs in the vector? Example: [code]template<class First, class Second> struct foo { First f; Second s; }; std::vector<foo> bar; //error! [/code]

Member Avatar for StuXYZ
0
99
Member Avatar for freddan007

Is it possible to get the return value of a function started with the CreateThread function or is the only way I can get a value from it to use global variables? I searched but i found nothing. Thanks.

Member Avatar for freddan007
0
526
Member Avatar for Alibeg

I ve just installed ubuntu intrepid ibex (8.10.) on my laptop i have been using it for a while already but i just wanted to clear the system completely so i installed it, put some updates, some programs, but i also installed CodeBlocks using synaptic manager. Everything finished smoothly. Now, …

Member Avatar for Alibeg
0
621
Member Avatar for h3llpunk

Hi, Ive started on doing some animations in win32 but i cant seem to know how to set the starting position without messing up the movement. Also all my animations are flickering. this is my code so far exluding the intializing, windows creations and such. [code=c++] typedef struct _REDINFO { …

Member Avatar for h3llpunk
0
81

The End.