49,757 Topics

Member Avatar for
Member Avatar for Crynix

First things first, I'm relatively new to C++. I'm just finishing up my first semester of computer science and I'm getting the error "Segmentation Fault (core dumped)" while opening a file in my final. I believe the error has to do with pointers and occurs somewhere in the while(!file.eof()) { …

Member Avatar for histrungalot
0
349
Member Avatar for trishtren

hello, i am attemping to write a basic swf header reader using the format specification from : http://www.the-labs.com/MacromediaFlash/SWF-Spec/SWFfileformat.html So far i am able to read the first 3 bytes : FWS, no problem The problem i am having is reading the version number after, it is displayed as a question …

Member Avatar for WaltP
0
163
Member Avatar for Zvjezdan23

Why is my score corrupted??? #include <iostream> #include <cstdlib> using namespace std; int main() { string names[10]; int score[10]; for(int scores = 10; scores >= 0; scores--) { cout << "What is your score? "; cin >> score[scores]; cout << endl; } int swapHolder = -1; int ten = 10; …

Member Avatar for DeanMSands3
0
134
Member Avatar for Zvjezdan23

I am programming a number of students and quiz questions and correct answers program for my school's programming II class. I have an ok knowledge of C++, but I cannot understand the reason why my code does not work. I have created an integer of num of students, I asked …

Member Avatar for DeanMSands3
0
130
Member Avatar for tomtetlaw

How do I make the coordinate system in DirectX 11 relative to the top left of the screen? I've setup an orthographic projection matrix, so that I can use screen coordinates but it makes more sense to me to have a top left origin, since I come from working with …

0
68
Member Avatar for ollie60

Hi I am having an issue with inputting data in the correct format in the code below. The code is modified from the original and I am currently trying to figure it out. Originally data was read in from what I am assuming was a binary file using the function …

0
82
Member Avatar for hanaac++
Member Avatar for Dasttann777

Hi again, I am working on a small project which sort of resembles a makeshift programming language, in which if the user types "print" and then a value, the console will write the value, and not the string, for example, if I write *Print "Hello"*, it will output the string …

Member Avatar for m4ster_r0shi
0
165
Member Avatar for MrEARTHSHAcKER

Hi, There is short explanation of queue at cplusplus.com site which tells that queue should contain front() and back() functions. As I have tested in VC++, if I use queue from <queue> and call any of these functions for an empty queue, program crashes. Could this problem be solved by …

Member Avatar for MrEARTHSHAcKER
0
2K
Member Avatar for a2i2

I need help with this problem can you solve it for me ( write the program) -A password-protected security door can only be opened when a user inserts a valid 4-digit personal identification number (PIN). -The program starts by asking the user to enter a 4-digit PIN.If it is valid, …

Member Avatar for a2i2
0
185
Member Avatar for 330xi

I want to run soem code by rolling a mouse wheel. MFC, doc/view In Mainframe header: afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt); In Mainframe source message map: ON_WM_MOUSEWHEEL() Event handler: BOOL CMainFrame::OnMouseWheel (UINT nFlags, short zDelta, CPoint pt) { if (zDelta>0) { OnDemokey(); } else { OnMinuskey(); …

0
59
Member Avatar for happygeek

A cyber weapon grade piece of malware, some twenty times the size of Stuxnet, has apparently been fired at a number of countries in the Middle East. This highly complex piece of code which takes screenshots of any open 'programs of interest' such as email or IM, records audio and …

Member Avatar for happygeek
0
671
Member Avatar for ChrisMackle

I get this error when compiling an sdl project i have please help me as i cant learn anything until i get my new compiler setup im using visual studi c++ 2010 the free edition i use to use code blocks but have upgraded heres my error: 1>------ Build started: …

Member Avatar for Ancient Dragon
0
275
Member Avatar for Sendy Hipo

hello, im newbie in c++ and i have some newbie questions. erm here's the problem ive been thinking : #include <iostream> #include <fstream> using namespace std; struct Info { string name; int age; }; int main() { Info person1, person2; fstream writefile("output.txt", ios::out | ios::binary); person1.name = "sendy"; person1.age = …

Member Avatar for Sendy Hipo
0
194
Member Avatar for Ancient Dragon

I'm trying to write a simple Windows Forms program ( CLI/C++) . In the Form1 class I declared a private int, but the forms designer view hates it. Produces this error: >C++ CodeDOM parser error: Line: 195, Column: 15 --- Unknown type 'int'. ... The program compioles with 0 errors …

Member Avatar for DavidB
0
357
Member Avatar for mrexp21

Please help me check c++ flowchart and pseudocode The source code files can be downloaded from here :- http://www.4shared.com/rar/jw-wLOJZ/Project.html

Member Avatar for Schol-R-LEA
0
224
Member Avatar for OrangeTree

Hi :). I don't found good examples for function sscanf(). Can you help me please with this situation? #include <cstdio> #include <iostream> using namepsace std; int main(int argc, char const *argv[]) { string way = "main/articles/animals/giraffe"; char arr[256]; char arr2[256]; sscanf(way.c_str(), "%[^'/']/", arr); cout << arr << endl; return 0; …

Member Avatar for OrangeTree
0
242
Member Avatar for SandraD

Hello, my name is Sandra. I have been bothering myself for few days with this issue. So I'm trying to create a code that will read from text file named "files.txt" and paste the 2nd line from that text file to somewhere else, like an opened window. void ReadFiles () …

Member Avatar for WaltP
0
110
Member Avatar for Ouss

Write a program that has a function multiple that determines a pair of integers whether the second integer is a multiple of the first.The function should take two integer arguments and return 1(true) if the second is a multiple of the first, and 0(false) otherwise. Use this function in a …

Member Avatar for Sendy Hipo
0
299
Member Avatar for iamthesgt

I am using Awk inside a bash shell script to search header files for c++ functions so I can add these functions to another file. All of the functions I need will have form: type getName() or type setName(type value) Right now I get all the functions listed in between …

Member Avatar for iamthesgt
0
449
Member Avatar for vicsong93

#include <stdio.h> #include <stdlib.h> #include <string.h> struct account { char AccName[100000]; int Age; float AccBalance; struct account *Next; }; typedef struct account BankAcc; void init(struct Account** headOfList); void insert(struct account **headOfList, char *name, int age, double balance); void remove(struct account **headOfList, char *name ); void print(struct account *headOfList ); void …

Member Avatar for Schol-R-LEA
-1
194
Member Avatar for 330xi

Hi! I want to add a picture to my opened word file. But not from file. I have some picture on a DC in my program and want it directly to Word document. Does anybode know how?

Member Avatar for 330xi
0
169
Member Avatar for cooh

http://pastebin.com/esxAR3wY This is my source code here...It is simply too big and ugly to fit in here, so I used this site.. If anyone can paste the code into his compiler and help me I will be grateful. Everything works except for the "addEntry" function (and I am guessing "resizeArrayCopy" …

Member Avatar for cooh
0
134
Member Avatar for sara5454

svp que fait ce programme ? merci d'avance 1.load A 2.ADD B 3.CMP 20 4.JB etq1 5.load A 6.SUB 1 7.JMP etq2 8.etq1 load A 9.Add 5 10.etq2 STORE A

Member Avatar for sara5454
0
159
Member Avatar for sara5454

hi everyone i create a simple program on dev++ but always a message error exist ps: im a debutante :/ plz help ! #include<stdio.h> #include <iostream> int main () {int a,b; __asm__ __volatile__ ("load a \n\t" "cmp b \n\t" "jb etq1 \n\t" "jmp etq2 \n\t" "etq1 load b \n\t" "etq2 …

Member Avatar for mike_2000_17
0
544
Member Avatar for sandz24

Does anyone know the equivalent version of cvCreateImage in c++. I tried googling it but no luck. Thanks!!!

Member Avatar for Ancient Dragon
0
125
Member Avatar for KungFuTze

Good Morning, I'm having some problems with my code. This program is to have at least 5 functions . 1.)Ingrades: a two dimensional array that stores student ID, grades and times absent. 2.)Score. Calculates scores for all course work (two partial tests 15% each , two quizzes 10 %each, 1 …

Member Avatar for Stephen Ayayo
0
2K
Member Avatar for arushi.05

can any body tell me a udf program in c++ which accepts a squared integer matrix with odd dimensions(like 3*3,5*5....) & display the sum of the middle row and middle column elements. please help me if you can................

Member Avatar for TrustyTony
0
168
Member Avatar for zeLek

Below is the error I am currently facing however I have yet to be able to bring up the console window to see if my code is correct. It has been very frustrating :( 1>iLab4.cpp(67): error C2144: syntax error : 'int' should be preceded by ')' 1>iLab4.cpp(67): error C2660: 'toDigit' …

Member Avatar for VernonDozier
0
89
Member Avatar for Sendy Hipo

erm i got a bit problem with toupper(); example: char ch = 'a'; char upper; upper = toupper(ch); if i use cout to show char "upper", it shows the ascii code for uppercase.. in this case, it shows '65' in screen, i know it supposed to show 'A' instead of …

Member Avatar for Sendy Hipo
0
127

The End.