49,757 Topics

Member Avatar for
Member Avatar for miteigi-san

I'm still working on the same problem. Im doing a text-twist code for c++ as part of our school requirement. Last time, I'm having problems on delaying outputs using CLOCKS_PER_SEC and clock(), but thanks to some people, I solved that problem already. Now, Im working on the game's play mode. …

Member Avatar for tetron
0
537
Member Avatar for the_caesar

I have a make file which compiles my C++ code on RHEL5. It contains the compilation flags as listed below. Where can I get the description of following g++ compilation flags: -D_UNIX -D_REENTRANT -DUNICODE -D_UNICODE -D__LITTLE_ENDIAN__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_LARGE_FILES -DLINUX -D__x86__ -D__linux__ -D____ -D__OSVERSION__=2

Member Avatar for Salem
0
79
Member Avatar for Dizzzy

Ok so I am having a problem using the method stat(), I need to find the filesize of a file and return it as a const char *, So i would need to convert the int value to a char. This is what i have now which does compile but …

Member Avatar for mitrmkar
0
299
Member Avatar for suncica2222

I use MS VC++6 and when I type code I have problem...let's say I have 123456789 typed and I place cursor between 4 and 5 and than type "something" I get 1234something and not 1234something56789 so it deletes and wont shift right :S also enter doesnt brake new line,space,backspace.... I …

Member Avatar for suncica2222
0
87
Member Avatar for SpyrosMet

My problem is the array Field which is considered by the compiler as undeclared. I declared the array in main and i'm trying to access it through the following .cpp file. animals.cpp : [CODE]#include <cstdlib> #include "organisms.h" #include "animals.h" // class's header file // class constructor Animals::Animals() { } void …

Member Avatar for SpyrosMet
0
130
Member Avatar for sidra 100

Although for consistent and reusable design we follow Object Oriented paradigms; “structured approach” has still its worth in some imperative and critical application. wat do u people say about this

Member Avatar for jonsca
0
91
Member Avatar for suncica2222

I need function that sends to email (text.txt file) in SMTP protocol? I've googled it up but I mostly found C# or VB codes... Can I get a link or code of such function?

Member Avatar for suncica2222
0
233
Member Avatar for anishakaul

Can any one point out links to some small projects w.r.t C++ ? Now when I say small projects, It [B]doesn't mean[/B] building a calculator or matrix multiplication programs, [B]nor[/B] does it mean building games, [B]nor[/B] does it mean dealing with databases, What I actually want is to use the …

Member Avatar for kvprajapati
0
93
Member Avatar for Zhrate

Hello, I'm seeking a solution to how to keep text updated in windows forms, currently Im using QT forms, and trying to keep my labeltexts updated but always fails, tried infinite true here and there but program always crash=\

Member Avatar for Nick Evan
0
34
Member Avatar for WargRider

Hello Everyone, As you can see, I am new to DaniWeb, and might I say this is a VERY good community. Either ways, my problem is a pretty complicated one, which I have been working on for a while now, 2-3 weeks. I am assigned by my team to create …

Member Avatar for Nick Evan
0
389
Member Avatar for cnidhi007

just the words but I am getting errors [CODE]#include<stdio.h> #include<conio.h> void main() { FILE *f1; char c='y', field[10][10]; int i=0, j=0; printf("Fields:- \n"); f1 = fopen("filename","r"); while ((c=getc(f1))!='\r') { while (c!='\t') { field[i][j] = c; j++; c=getc(f1); } c='y'; printf("%s ",field[i]); i++; } printf("i = %d, j = %d", i, …

Member Avatar for Nick Evan
0
67
Member Avatar for Mz3g

Hi everyone, I'm reading two values from my text file after that I have to find all the possible points in this row*column data. I wrote this code but I got an infinite loop as a result instead of getting N1=(1,1), N2(1,2) till the the last column which is n, …

Member Avatar for Mz3g
0
91
Member Avatar for RobBobSmith

Hi all: I am quite new at C++. I am using it to run transport calculations. The results of each calculation (rows and columns of data) need to be plotted. I would like to use Matlab. I have searched Matlab help and found that it is possible to write a …

Member Avatar for amimiSexsmito
0
142
Member Avatar for chotib

i am confused about syntax highlighting, if i am paste text from clipboard to RichEdit, the syntax highlighling doesnt work perfectly. here is my code : [code]//On header(FWDesign.h) define TStringList *htmltag; TStringList *atribut; //On FormCreate void __fastcall TFWDesign::FormCreate(TObject *Sender) { htmltag = new (TStringList); atribut = new (TStringList); htmltag->Add("html"); htmltag->Add("body"); …

0
54
Member Avatar for angel6969

I am having trouble with getting the math from paper to C++ code ... I am asking for user input for a numerator and a denominator .... the function then treats the variables as a fraction and reduces it to the lowest term ..... I had some math in the …

Member Avatar for angel6969
0
272
Member Avatar for alcay

help me how to do a word scrolling like a snake game without hitting any keys.

Member Avatar for Ancient Dragon
-2
82
Member Avatar for sexyzebra19

Could someone please have a look at my code and tell me anything that can be improved? Anything at all - layout, using headers etc? Thanks in advance! [code=php] #include<iostream> #include<vector> #include<cmath> #include<iomanip> using namespace std; typedef double(*fun)(double); //Declare functions double gauss(fun f, double &a, double &b, int &n, double …

Member Avatar for jonsca
0
131
Member Avatar for Ana_Developer

Before I proceed with the code implementation, I need to find the error that this program initiates. I can't figure out the solution, I guess thats what happens after not using c++ for 4 years... The compilation errors I'm getting are all of this type (11 of them): Error 9 …

Member Avatar for Ana_Developer
0
194
Member Avatar for Ana_Developer

I cant find the error here.. [CODE]#include "stdafx.h" #include <deque> #include <list> #include <queue> #include <iostream> #include <fstream> #include <string> #include <sstream> #include <set> using namespace std; char file_name[15]; char links_file[15]; char alg[15]; char with_list[15]; char new_name[15]; int depth; long idstart,idgoal; class Action { public: long start_node; long end_node; int …

Member Avatar for Ana_Developer
-1
224
Member Avatar for Mz3g

Hi guys, I'm new to C++ and I'm doing a small project, I got a little problem with reading a specific number from a text file. for example: size 2 3 I want my program to read the 2 to a and the 3 to b. Also I want the …

Member Avatar for Mz3g
0
318
Member Avatar for clutchkiller

Is this API striclty for 3d applications including sound and modeling etc.... or can you program windows forms as well? Just wondering

Member Avatar for VilePlecenta
0
85
Member Avatar for RehabReda

hi guys i have a little question i don't understand this line typedef [COLOR="Red"]basic_string <char>[/COLOR] string ; i have searched but can't get it any one can help ur help will be appreciated

Member Avatar for mrnutty
0
96
Member Avatar for sid78669

As part of a homework, I created the following Puzzle Class and it works. The thing is, it only work if i put the class in q2.cxx, the main code file. If I place them in three seperate files, I get hell load of problem. Can anyone please look at …

Member Avatar for Ancient Dragon
0
153
Member Avatar for b.bob

Hi, I am a newbie to C++ (and programming in general) I have the following: [CODE] char* fOutMsg; strcpy(fOutMsg, "03DS2"); [/CODE] -------------------------------------------------------------- in another place: [CODE] char fPpn[32] = {0}; strcpy(fPpn, " "); [/CODE] ------------------------------------------------------------------- in another location: [CODE] char fStr; struct* ioEx; strcpy(fStr, W2A(ioEx->authcode)); [/CODE] --------------------------------------------------------------------- more: [CODE] char* …

Member Avatar for dusktreader
0
358
Member Avatar for mattitude

Basically, I'm writing some code that will take text from some .txt files and rearrange them into other .txt files. I've written 3 functions, but ignore the 2nd one, I haven't worked on it yet. When I try to call my 3rd function, I get an error message from Dev …

Member Avatar for mattitude
0
370
Member Avatar for Dani

[B]ADT.h[/B] [code] struct process { int pid; // process id char* file_name; // file name of the process to be run int cpu_time; // amount of time the process needs with the cpu int request_priority; // priority from 1-5 (higher is better) int pr; // adjusted priority rate }; /**********************************************************************/ …

Member Avatar for Fbody
0
1K
Member Avatar for 28daniela28

I have the following code ( I'm creating a binary tree and then I want to print the values on it's leafs) but when I'm running it, it never enters in that if from the parcurgere function. What have I done wrong? [CODE]#include <iostream> using namespace std; class node { …

Member Avatar for 28daniela28
0
136
Member Avatar for walter clark

I have about a year of full time experience with Visual C++ 2008. I am productive but I'm still frustrated with the debugger. Is this the right forum to get help with the debugger? My biggest problem is not seeing any value when the variable is deeply burried within an …

Member Avatar for walter clark
0
122
Member Avatar for WolfPack

Is it possible to read data from a binary file to a C++ class using [inlineCODE]istream::read[/inlineCODE]? I know it can be done for structures, but I couldnt do it for a class. [Edit] Want code? [CODE]#include <iostream> #include <fstream> class BITMAPFILEHEADER { private: char type[ 2 ]; // Magic identifier …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for nayadin

1) The class interfaces do not follow good object-oriented design principles, which make them bug-prone and hard to extend/subclass properly. Improve the object-oriented design of the classes. 2) The class interfaces are almost completely undocumented. Include proper interface documentation in the .h-file. 3) There seems to be a bug somewhere, …

Member Avatar for VilePlecenta
-1
365

The End.