49,761 Topics

Member Avatar for
Member Avatar for fmasroor

2 questions that I have always wondered about: 1. On my compiler, I have to use [CODE]#include "stdafx.h" #include <iostream> #include <Windows.h> using namespace std;[/CODE] and not [CODE]#include "stdafx.h" #include <iostream.h> #include <Windows.h>[/CODE] Please explain the difference between these 2. (c++) 2. Why use pointers when the array can be …

Member Avatar for Schol-R-LEA
0
115
Member Avatar for cummings15

My code complies fine but freezes when i try to run it. I Believe the error is somewhere between lines 82-115 [CODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> #include <cmath> using namespace std; struct domList { string domName; string ipAddress; int counter; }; void insertOne(domList list[], ifstream& inFile, int …

Member Avatar for cummings15
0
301
Member Avatar for Rez11

I am making a trivia game that consist of 10 questions. I am using a class to make an array of 10 objects. I have the program all written out but when I compile I get two errors. [COLOR="Green"]Error 1 error LNK2019: unresolved external symbol "void __cdecl displayGame(class Game,int)" (?displayGame@@YAXVGame@@H@Z) …

Member Avatar for dan1865
0
195
Member Avatar for fmasroor

I am using microsoft visual c++ 2010. when I compile, it gives me several warnings, and the ocassional errors. However, most of these warnings are in the header files that are included in the program. Is there a setting that only displays errors/warnings in the program and not the includes? …

Member Avatar for Moschops
0
531
Member Avatar for Golffor1

Hello, I have a program where I am using an object array that I declare from a class. I am trying to store information from a text file into this array. I will then be doing other items like searching the array and displaying it into another text file. I …

Member Avatar for thines01
0
847
Member Avatar for fmasroor

Using microsoft visual c++ 2010. Everything is screwing up. I want to take an input file, write to an output file, and use the lines of the input file as strings. But... On previous run, I didn't have that last printf line. So everytime I run it, it just prints …

Member Avatar for Schol-R-LEA
0
332
Member Avatar for cummings15

I have a error with a nodeType. I believe it is just one line. The error says "[Linker error] undefined reference to `insert(nodeType*,std::basic_ifstream<char,std::char_traits" and "Id returned 1 exit status" This line is the part of code that i believe is wrong. [CODE]nodeType *insert(nodeType *list, ifstream& inFile);[/CODE] [CODE]#include <iostream> #include <string> …

Member Avatar for r.stiltskin
0
149
Member Avatar for triumphost

My problem is at line 54 and line 124.. Not sure how to fix it at all.. I basically just want to store all the values of NameIdx to the vector and print the values of the vector. But instead if shows random/AltKeyCode characters and crashes. I know its probably …

Member Avatar for nezachem
0
139
Member Avatar for Zssffssz

well here is something interesting: How many calculations, math, movements, assignments, can I do in the glbal area? EX: [CODE]Header/using blah int vap = 7; int pav =2; int sasd = 0; (sasd=(vap*pav));[/CODE] Would the last line work? Or do I have to declare a vareable to do any math/calculations? …

Member Avatar for mike_2000_17
0
162
Member Avatar for jimbo_cambridge

Hello, I have a text file to read in. It is of the format [CODE] ! this is a comment ! this is another comment 8 3.3 2.2 5.6 6.7 4.4 5.5 4.4 1 3.3 2.3 34.5 5.5 10.3e10 1 3.3 2.3 34.5 5.5 10.3e10 1 3.3 2.3 34.5 5.5 …

Member Avatar for jimbo_cambridge
0
1K
Member Avatar for axiss

does anyone know where I can find some help on integration functions in c++?

Member Avatar for ynikitenko
0
278
Member Avatar for supersuru

hey can some 1 please help me out am new to c++ having multiple errors on this code if you could assist thankx[code]#include<stdio.h> void mainmenu(); void withdrawcash (); void cashtransfer(); void depositcash (); void displaycash(); void normalcash (); void balance (); void username(); //char login[16]=’martin ’; int fcash,famount; int password=12345, …

Member Avatar for supersuru
0
302
Member Avatar for Ccuteri60

Hi, i am making a heap sort program using a struct known as Date, anyhow i am getting an error in two lines that i cant figure out how to solve...[CODE]void dahHeap(Date a[], int i){ int n = sizeof(a); int lefty = 2 * i; int righty = 2 * …

Member Avatar for Ccuteri60
0
373
Member Avatar for BoBok2002

I am working on a project and part of the instruction goes like this: "The whole system allows up to 10 processes currently stay in memory, only one of them is running on the CPU, while the others are in either the Ready Queue or blocked in the Disk queue. …

Member Avatar for BoBok2002
0
2K
Member Avatar for crc0002

My code is posted below along with it's output of errors. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; class Node { public: string name; Node* north; Node* south; Node* east; Node* west; }; class MazeConstructor { private: Node nodes[12]; public: Node* ConstructMaze(); }; Node* MazeConstructor::ConstructMaze() { nodes[0] …

Member Avatar for Schol-R-LEA
0
9K
Member Avatar for bkoper16

im creating a program that tests the functionality of template classes for my c++ class but i keep getting this error at the overloaded << and >> functions when i try to test the class using a double can someone help me out MyData.h [code] #include<iostream> using namespace std; #include …

Member Avatar for bkoper16
0
1K
Member Avatar for vikjatajy

I have got problems with printing of my code . I want to print a stack in which i have stored nothing and the size of stack is 5 elements from 0-4 . In the code I am using aggregation and hae defined 2 (.h) files CComplex and ClifoBuffer #include …

Member Avatar for teo236
0
189
Member Avatar for MrAppleseed

I've recently been trying to get only a certain number of tokens into a char array. Here, I'll try to clarify; "Jill went to the grocery market to buy tomatoes while fapping". What I've been trying to do is get the thing she's buying, get what she was doing (i.e. …

Member Avatar for MrAppleseed
0
300
Member Avatar for camelNotation

Somebody told me that he could access c++ private data members without using the " Friend" type or public functions.He gave a source code and that was compiled in Turbo c++3.0 :-( May I post that here?

Member Avatar for tekbhatta
1
2K
Member Avatar for jackmaverick1

Sorry, but I REALLY don't understand what could possibly be wrong with my code (or maybe it's not my code?). When I run the writeChar(char*,char) function, my program crashes. I really don't have any idea why, as my pointers (I think, I've checked, but I'm not very good at that) …

Member Avatar for Schol-R-LEA
0
350
Member Avatar for BoBok2002

Revised Code. I have revised this code so many times that, I don't know what else to do. I posted this code a few days ago and a number of people gave me pointers which I included in my code. But it's still not working. Based on examples I saw …

Member Avatar for BoBok2002
0
1K
Member Avatar for carolinatech

Hey all, I have a question how would I go about perform a comparion for two boxes. I would have to find the length, width, and height of both boxes and compare the volume of them to see which box would have be larger.

Member Avatar for WaltP
0
76
Member Avatar for vrs1155

friends i create mfc application and create two table -same database,same content. ex:table content(table 1,table 1) employee id,employee name,department,salary,mobile no. now i view data from table 1 and that data to insert on table 2. i doing many way,but i didnt done.please any one can help me? this operation only …

Member Avatar for thines01
0
587
Member Avatar for Goshutu

Hi, DaniWeb forum members! I am an above-amateur programmer and this is my first more complex SDL-based program. I am trying to make the menu of a game, but SDL cannot capture the key presses when a single key was pressed. I use only UP and DOWN arrows, in this …

Member Avatar for Goshutu
0
736
Member Avatar for Sgt. Pepper

So, Ive created a UI in console. No questions as to why. But anyways, It used to be just a simple array, but I decided to make it with vectors both to improve my skill with them, and to make its size dynamic. Dont mind the mess of code here. …

Member Avatar for Schol-R-LEA
0
278
Member Avatar for jigglymig
Member Avatar for jonspeidel

I have a snippet of code that's 37 lines long, I can't, for the life of me, seem to get it working. It compiles fine, no errors, I've had 2 friends run through it and nothing, is it just an issue with my compiler(CodeBlocks)? Long story short I really just …

Member Avatar for WaltP
0
251
Member Avatar for tsy123

i,m making a 3d pool (billiard) simulation using c++ in opengl for my project. where can i get a proper source to refer as what i found on web were not very useful for me. Any links or sources from you are appreciable.

Member Avatar for apneweb
0
112
Member Avatar for MechMOn

Hello I am having an issue with syntax. I have: [CODE]wxLegendWindow::wxLegendWindow( wxWindow *parent) : wxWindow(parent, -1, wxDefaultPosition, wxSize(LEGEND_WIDTH,LEGEND_HEIGHT)) m_WinParent(parent)[/CODE] and when I compile I get: [CODE]C:\codeblocks-10.05-release\src\plugins\contrib\wxSmithContribItems\wxchart\wxchart-1.0\src\legendwindow.cpp|50|error: expected '{' before 'm_WinParent'|[/CODE] The code I originally started with was: [CODE]wxLegendWindow::wxLegendWindow( wxWindow *parent ): wxWindow(parent, -1, wxDefaultPosition, wxSize(LEGEND_WIDTH, LEGEND_HEIGHT)/*, wxSIMPLE_BORDER*/), m_WinParent(parent) [/CODE] However …

Member Avatar for Ancient Dragon
0
169
Member Avatar for lupacarjie

Hello, I created a simple number guessing game which thinks of a secret number from 1 to 100. It tells the user if his guess is high or low and finally stops after the secret number is equal to the user's input, it also notes down the number of tries. …

Member Avatar for lupacarjie
0
1K

The End.