49,761 Topics
| |
Hiya Im trying to make a few efficient maths classes that will optomise using SIMD SSE or SSE2 if the target CPU supports those SIMD variants or failing to support either use a normal CPU bound c++ version. The issue im having is that i want to have for example … | |
Hi everyone, I'm working with a text file. I want to read a part of it into a string. Here is a sample: <MEAN method="jackknife">3.97e-06</MEAN> In the above line i want to put the number 3.97e-06 into a string. The code that i wrote can find the position of the … | |
I'm trying to convert part of a string. Say I have a bunch of strings and I want to search through all of them, and whenever one of them have the string "34" contained within, I want to convert that part of the string to "XX". Imagine the following: [CODE] … | |
Hi Guys, I need to convert a 1D array into a 2D array. Usually a easy problem but my problem is the way data is stored in the 1D array The structure of the 1D array is r0c0, r0c1, r1c0, r1c1, etc etc so for example if my 1D array … | |
Hi there, I'm working with a file. I want to write a code that returns a particular string located somewhere in the file. I have the starting position of the desired string and it's length so I thought that i can use substr(starting position, length of the string) but it … | |
hello, i would say im new to c++, my most advanced program was just a simple tic tac toe application. I am interested in learning more about c++. I have searched A LOT and cant find any good ebooks or links. I need links or ebooks to go further! please … | |
need c++ source code using array and loops.... i got a little problem thiking of it... | |
hello there, im new to C++ and i tried to design this code but the code is not running and i there is the code below [CODE=cpp]#include <iostream> using std::cout; using std::cin; using std::endl; #include <string> using std::string; using std::getline; class staffMember{ public : void setFirstName (string fname){ FirstName = … | |
So, I've learned my lesson in the past. I'm not experianced enough to design a program from start to finish in an elegant way. I'm not looking for code in any way, just some code flow suggestions if anyone has any. This is what I'm trying to do: -Do a … | |
Hi all, I was recently working on a C++ application in Xcode (free Mac developer tool) and started running into some really weird BUS errors. What happened was that the code would compile and run fine in terminal up until I initialized two new variables just like this --> … | |
i have been given an oop project on quiz condution while using operator overloading and file handling ..plzz help:( | |
Hey Hi..to everybody..I am new to this C++. My problem is that I want the input and output to be taken from windows interface not from the command line. A window should open and it should ask the question to proceed and the output should appear there.Take for example: it … | |
how can i make a movable window in turbo C++ by using graphics.h......i mean....as i can move any picture with XOR_PUT .....can i move any editable window??? | |
I'm trying to compile an assembly file (.asm or .s) from a c++ file to be used in SPIM. SPIM requires that the file be in MIPS32ABI and for MIPS I ISA. My g++ compiler is not working well and I was wondering if there were any compilers out there … | |
Hi all : ) I'm coding a snake game, now the problem is to get the input from the user if I used getch(); the snake will wait until she got an input from the user, so how can I let the snake run normally and expect input in any … | |
Help please, I wrote a script in C++ for loading a map file, parsing it with XML, and outputting the objects in the file. The XML parser works great, but it won't open the file. I have it exiting if the file doesn't exist, and the file doesn't load, even … | |
Hi, I want to be able to copy my existing code, with all highlighting & formatting preserved to a file. Is it possible? Evan D. Knight | |
I'm attempting to manually load the hexdump of an elf file that I compiled using g++ into a processor simulation I designed. There are 30 sections to a standard elf file and I am loading all 30 segments with their proper memory location offset taken into account. I then start … | |
Ok, so I am having some trouble with my calculator code. The two issues I am having are: 1. I cant get my program to produce decimals, I have tried using "float" but that didn't work so i don't know how to fix that. 2. I don't know how to … | |
I have met a problem in Identifying the ways of updating a file in c++ | |
I want to make program in WINApi -it is simple window with one textbox - if you will press key 'A',it jumps to textbox(like when you click on it,and then you will be able to write to it). Only thing I dont know is if in WINApi is a function … | |
if i open a file ouput using [B]ofstream[/B] it's openmode is set to [B]ios::out[/B] and [B]ios::trunc[/B]... what I have to do, if I want to have only the ios::out flag...not the ios::trunc flag.Because, it is deleting all the previous contents. How do i undo this flag?or, what to do, if … | |
Check out my code on Pascal's triangle using C++. [CODE]#include "stdafx.h" #include <iostream> using namespace std; int pascals(int,int); int fact(int); int main() { int r,e,levels,space; cout<<"Enter the number of lines needed";cin>>levels; space = levels+1; for(r=0;r<=levels;r++) { // std::cout.width(space);//shape for(e=0;e<r+1;e++) { cout<<pascals(r,e)<<" "; } cout<<endl; space--;//shape } cout<<endl; cin>>r; return 0; … | |
Hi I don't really know where to put this but how does one use WxWidgets with c++. I just need to know the syntax or structure of it. For example: What would wxwidgets equivalent be for the native code... [CODE] #include <iostream> int main() { int num1, num2, total; std::cout<<"Enter … | |
hi... i am completely new to xml.. how to compare parsed data in c++??.. I am using expat. should i use huge else-if statements to compare the elements i just extracted ?? is there anyother way of doing it??? I have a feeling i have messed up somewhere.. | |
I am trying to change some data indside a txt file, based on the input given by the user.The input file is [B]indata.txt[/B](The commented part is, what it holds).And the output file is [B]"outdata.txt"[/B]... The problem is with line 52 and 53.Notice that in the loop from line 55 to … | |
Hi guys, I have a code in C++ that was written way back in 1995.Back then,I guess even in C++,#include<iostream.h> was used unlike nowadays, #include<iostream> using namespace std;.....im rite now trying to compile that code with a g++ compiler.It gives the error at lots of places:"cout not declared in this … | |
So to accept multiple clients, I am dynamically accepting them, but so that I can handle them(data transfer etc...) I wrote a linked list which so far works fine. I can broadcast a message to all clients fine by looping through my list and SEND->client, fairly standard. But when a … | |
Hey there! I'm new to c++ and programming in general and have a quick question to why the program below works. I had most of it completed but for hours i couldn't figure out why every time i tried to enter input for the "make" member of my dynamic structure … |
The End.