49,761 Topics

Member Avatar for
Member Avatar for Flowerlady

I know zilch about electronics, that is why I am on this site, because I have a problem. I do R & D in the world of Metaphysics, and my specialised subject is Subtle Energies. Normally in this field we have to use things like Pendulums, stick pads, muscle testing …

Member Avatar for mike_2000_17
0
138
Member Avatar for reallyslick

The first problem is this: I want to create a LinkedList of type_A. type_A will contain a LinkedList of type_B. The below code fails at compile saying: Node_B does not name a type. The only way i see around this is to create different LinkList.cpp files for each type (such …

Member Avatar for Ancient Dragon
0
172
Member Avatar for daino

I'm a little confused about how to go about creating a wrapper class? I think I need to start with the basics. What I want to do is write a C++ wrapper class for a C API. I know several of you could explain this well but I need to …

Member Avatar for daino
0
4K
Member Avatar for claywin

Hello everyone, I have a quick question! I've been program a little heavily lately on my first game in c++ and it got me thinking, how are you supposed to share your game as a closed source project? Thanks in advance!

Member Avatar for mike_2000_17
0
194
Member Avatar for wesk18

Hi, Im trying to create a script or program that allows me to input data and gives me the result so i can copy and paste in an email. this is what i write on emails the only thing that changes is what is in bold first one is users …

Member Avatar for ravenous
0
72
Member Avatar for n1csaf3

I am having some difficulty's locating an issue within some code I am working on. It breaks when it runs the "if (AIwords->name == NULL)" // This is the struct which is located in the header(.h) struct AIstruc_word { char *name; bool controlStatement; struct AIstruc_word *next; }; // This is …

Member Avatar for ravenous
0
153
Member Avatar for skondgekar

# I have Written a code for sine function but it is not much accurate# I have written a code for PI() and sin() function but it is not much accurate I want to make it more accurate can anybody tell how can I make it more accurate. Also I …

Member Avatar for mike_2000_17
0
982
Member Avatar for MasterHacker110

I have this code, but when i type in one comand and then the next comand it does doe the comand i type in but the first comand i typed in. * I think it is becuase i dont clean my vector string, if so how do i clean it. …

Member Avatar for MasterHacker110
0
240
Member Avatar for morganbrooke09

I can't get the accumulator right, It just keeps giving what the pay for the next day would be. Example: Enter 5 for workDays, get 0.32 for total Please let me know what it is I need to change. //This program calculates the total pay earned over x days. #include …

Member Avatar for triumphost
0
156
Member Avatar for triumphost

I have the following code to take a bitmap of a portion of the screen specified by the Box Area. Area is just a struct that holds Width, Height, X1, Y1, X2, Y2 and represents a box. Basically a RECT with additional features. For some reason, if Box is (0, …

0
86
Member Avatar for XodoX

The input looks like this: Start 0 Run 40 Disk 0 Run 20 End Each word and number means something. The number is the time and the word a command. What's the best way to loop through it and evaluate it? So it's 2 different elements per line that should …

Member Avatar for XodoX
0
137
Member Avatar for Suzie999

I'm currently concantenating an array like so... int _tmain(int argc, _TCHAR* argv[]) { //create buffer to receive path WCHAR pathbuf[MAX_PATH]; //get path into buffer DWORD pathlen = GetCurrentDirectoryW(MAX_PATH,pathbuf); //append file name to buffer pathbuf[pathlen++] = '\'; pathbuf[pathlen++] = 'f'; pathbuf[pathlen++] = 'i'; pathbuf[pathlen++] = 'l'; pathbuf[pathlen++] = 'e'; pathbuf[pathlen++] = …

Member Avatar for Suzie999
0
209
Member Avatar for triumphost

I've just read a tutorial on Classes Under the hood/behind the scenes. It says that: Foo* A = new Foo(); // Is different from: Foo* B = new Foo; What in the world? I never put the brackets for my classes like that. Why does the first initialize variables and …

Member Avatar for mike_2000_17
0
264
Member Avatar for codercpp1

I'm not sure how to do this, but i'm making a small shell in C++ in command line, with a few external scripts and executables being called. What I want to do is either make a simple web browser or a way to show web pages in C++, or if …

Member Avatar for c++Fun
0
2K
Member Avatar for Jackk123

#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; int main() { char stupac1, stupac2; for (static_cast<char>(stupac1)= 'A'; stupac1 <= 'Z'; ++stupac1) { for (static_cast<char>(stupac2) = 'a'; stupac2 <= 'z'; ++stupac2) cout << stupac1 << setw(5) <<stupac2 << endl; } return 0; } So before i make mistakes explaining this, …

Member Avatar for Jackk123
1
124
Member Avatar for poloblue

Good Afternoon, I'm having difficulties with a program that deal getting the letters frequencies from an input text file. So far I have this code. Cpp file: #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> #include "lab_19_head.h" using namespace std; int main( ) { …

Member Avatar for Ancient Dragon
0
95
Member Avatar for XodoX

I have a linked list where the input is read into. The 2 types of input have to go into a queue. 1 queue for each type. I suppose that the output line of the linked list can be used to read it into the queue ? I know it …

Member Avatar for XodoX
0
156
Member Avatar for Lucaci Andrew

Hi. So I get this weird error message out from a QT application that i'm creating: 0xc0000005: read access violation at: 0x0, flags=0x0 Basically what I'm trying to do is to set in a QT List Widget an item of type QList Widget Item in which I store two things: …

Member Avatar for Lucaci Andrew
0
3K
Member Avatar for Remy the cook

I have to write a program that finds a pattern in a text using Brute-force method. I have made functions to read the text file, pattern file and to execute the brute force algorithm(called match). These are called in main(). i need to store the index (at which the pattern …

Member Avatar for Remy the cook
0
232
Member Avatar for Psyho

Hello I am in need of information. I have the following: xx.func(1).func(2).func(3) how should the func be written for it to work? Thanks

Member Avatar for mike_2000_17
0
252
Member Avatar for Perry31

Can anyone elobrate me about Name Mangling? i tried to get name mangling for the below, struct sample { int a; char b; int a[1]; }; int myfun(int a, int b, int c[], struct a[]) { return 0; } int main() { struct sample Mystruct[2]; int a, b, c[9]; //Trying …

Member Avatar for Perry31
0
163
Member Avatar for binningen

I'm trying to use GNU flex to write a lexical analyzer. Is it possible to have multiple definitions for the same name in Flex? Like this: /* DEFINITIONS */ FRUITS "APPLE" | "ORANGE" | "LEMON" Also, what can we do and not do with string constants in flex's regular expressions? …

Member Avatar for L7Sqr
0
159
Member Avatar for poloblue

Good Afternoon, I'm having trouble with an assignments that deals with arrays. I'm stuck in the part that says Decide whether the value entered by the user at (2) is in the array numbers[SIZE] or not. So far I have this code #include <iostream> #include <fstream> #include <string> #include <cstring> …

Member Avatar for poloblue
0
137
Member Avatar for VernonDozier

I've been studying up on virtual destructors and how they work and I wrote this little program. I've been adding and removing the word "virtual" on lines 9, 16, and 23 to see what happens. #include <iostream> using namespace std; class a { public: a(){cout << "a::a()" << endl;} virtual …

Member Avatar for VernonDozier
0
216
Member Avatar for binningen

I'm having trouble opening a file using fopen in C++. I'm using XCode 4. Here's my code: FILE *f; f = fopen("test.txt", "r"); if (f == NULL) std::cout << "Error: NULL file"; When I run this, the error message gets printed. test.txt is stored in the same directory as my …

Member Avatar for binningen
0
1K
Member Avatar for osiron

I'm trying to create a program where I want to generate all permutations [1,2,3,4] and I recursively generate all the permutations of [1,2,3]: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] and then put 4 back into the sequence of numbers. For example, with [1,2,3], we get [4,1,2,3], [1,4,2,3], [1,2,4,3], and [1,2,3,4]. …

Member Avatar for osiron
0
180
Member Avatar for triumphost

I just learned C++ style casting and the 4 types of casts. I'm not sure if I'm abusing it though. Examples: typedef long (*stringFromString)(int, char*) __cdecl; //TO: typedef long static_cast<*stringFromString>((int, char*)) __cdecl; SmartSetup((char*)World.c_str(), (char*)",f5", 765, 503,(char*)""); //TO: SmartSetup(static_cast<char*>(World.c_str()), static_cast<char*>(",f5"), 765, 503, static_cast<char*>("")); memcpy(&INH, (void*)((DWORD)Buffer + IDH.e_lfanew), sizeof(INH)); TO: memcpy(&INH, static_cast<void*>(static_cast<DWORD>(Buffer) …

Member Avatar for mike_2000_17
0
649
Member Avatar for triumphost

I have just came across a class for the first time ever that does not have variables in any of it's declarations but has them in the implementation. Why is this class behaviour allowed? What are the benefits of not putting variable names? class Testing { public: Testing(int, int, int); …

Member Avatar for deceptikon
0
127
Member Avatar for RonKevin

#include<iostream.h> #include<conio.h> int lg, a; void gi() { cout<< "Enter Lowest Grade:"; cin>>lg; cout<< "Enter Average:"; cin>>a; clrscr(); } void display() { cout<< "Lowest Grade:"<<lg<<"\n"; cout<< "Average Grade:"<<a<<"\n"; } void eval() { char ch; if(lg>=85 && a>=92) cout<<"Remarks: Full SCHOLAR"; if(lg>=85 && a>=90 && a<=91.99) cout<<"Remarks: Half SCHOLAR"; if(lg>=80 && …

Member Avatar for RonKevin
0
262
Member Avatar for silvesterphilip

*i like to study c programming from its basis to full., any website for c tutorial with simple and full contents? i search in google but no get a good site.*

Member Avatar for Lucaci Andrew
0
47

The End.